add Component.is_default bool type annotation
This commit is contained in:
parent
935286b464
commit
f44d0edc38
@ -14,4 +14,4 @@ class Head(NextHeadLib, MemoizationLeaf):
|
||||
|
||||
tag: str = "NextHead"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
@ -21,7 +21,7 @@ class Script(Component):
|
||||
|
||||
library = "next/script"
|
||||
tag: str = "Script"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# Required unless inline script is used
|
||||
src: Optional[Var[str]] = None
|
||||
|
@ -94,7 +94,7 @@ class ChakraColorModeProvider(Component):
|
||||
|
||||
library = "/components/reflex/chakra_color_mode_provider.js"
|
||||
tag: str = "ChakraColorModeProvider"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
|
||||
chakra_color_mode_provider = ChakraColorModeProvider.create()
|
||||
|
@ -63,6 +63,6 @@ class Default404Page(Component):
|
||||
|
||||
library = "next/error"
|
||||
tag: str = "Error"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
status_code: Var[int] = 404 # type: ignore
|
||||
|
@ -168,7 +168,7 @@ class Upload(MemoizationLeaf):
|
||||
|
||||
tag: str = "ReactDropzone"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# The list of accepted file types. This should be a dictionary of MIME types as keys and array of file formats as
|
||||
# values.
|
||||
|
@ -107,7 +107,7 @@ class DataEditor(NoSSRComponent):
|
||||
"""The DataEditor Component."""
|
||||
|
||||
tag: str = "DataEditor"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
library: str = "@glideapps/glide-data-grid@^5.3.0"
|
||||
lib_dependencies: List[str] = [
|
||||
"lodash@^4.17.21",
|
||||
|
@ -79,7 +79,7 @@ class Markdown(Component):
|
||||
|
||||
tag: str = "ReactMarkdown"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# The component map from a tag to a lambda that creates a component.
|
||||
component_map: Dict[str, Any] = {}
|
||||
|
@ -25,7 +25,7 @@ class Moment(NoSSRComponent):
|
||||
"""The Moment component."""
|
||||
|
||||
tag: str = "Moment"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
library: str = "react-moment"
|
||||
lib_dependencies: List[str] = ["moment"]
|
||||
|
||||
|
@ -12,7 +12,7 @@ class Image(NextComponent):
|
||||
|
||||
tag: str = "Image"
|
||||
library = "next/image"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# This can be either an absolute external URL, or an internal path
|
||||
src: Optional[Var[Any]] = None
|
||||
|
@ -13,7 +13,7 @@ class NextLink(Component):
|
||||
|
||||
tag: str = "NextLink"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# The page to link to.
|
||||
href: Optional[Var[str]] = None
|
||||
|
@ -12,7 +12,7 @@ class Video(NextComponent):
|
||||
|
||||
tag: str = "Video"
|
||||
library = "next-video"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
# the URL
|
||||
src: Optional[Var[str]] = None
|
||||
|
||||
|
@ -23,7 +23,7 @@ class Plotly(PlotlyLib):
|
||||
|
||||
tag: str = "Plot"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# The figure to display. This can be a plotly figure or a plotly data json.
|
||||
data: Optional[Var[Figure]] = None
|
||||
|
@ -218,7 +218,7 @@ class RadixThemesColorModeProvider(Component):
|
||||
|
||||
library = "/components/reflex/radix_themes_color_mode_provider.js"
|
||||
tag: str = "RadixThemesColorModeProvider"
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
|
||||
theme = Theme.create
|
||||
|
@ -16,7 +16,7 @@ class ReactPlayer(NoSSRComponent):
|
||||
|
||||
tag: str = "ReactPlayer"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
# The url of a video or song to play
|
||||
url: Optional[Var[str]] = None
|
||||
|
@ -77,7 +77,7 @@ class Editor(NoSSRComponent):
|
||||
|
||||
tag: str = "SunEditor"
|
||||
|
||||
is_default = True
|
||||
is_default: bool = True
|
||||
|
||||
lib_dependencies: List[str] = ["suneditor"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user