Compare commits
2 Commits
main
...
textarea-p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
05aacae068 | ||
![]() |
3c6527daea |
@ -9,11 +9,14 @@ from reflex.vars import Var
|
|||||||
|
|
||||||
from ..base import (
|
from ..base import (
|
||||||
LiteralAccentColor,
|
LiteralAccentColor,
|
||||||
|
LiteralRadius,
|
||||||
RadixThemesComponent,
|
RadixThemesComponent,
|
||||||
)
|
)
|
||||||
|
|
||||||
LiteralTextAreaSize = Literal["1", "2", "3"]
|
LiteralTextAreaSize = Literal["1", "2", "3"]
|
||||||
|
|
||||||
|
LiteralTextAreaResize = Literal["none", "vertical", "horizontal", "both"]
|
||||||
|
|
||||||
|
|
||||||
class TextArea(RadixThemesComponent, el.Textarea):
|
class TextArea(RadixThemesComponent, el.Textarea):
|
||||||
"""The input part of a TextArea, may be used by itself."""
|
"""The input part of a TextArea, may be used by itself."""
|
||||||
@ -26,9 +29,15 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
# The variant of the text area
|
# The variant of the text area
|
||||||
variant: Var[Literal["classic", "surface", "soft"]]
|
variant: Var[Literal["classic", "surface", "soft"]]
|
||||||
|
|
||||||
|
# The resize behavior of the text area: "none" | "vertical" | "horizontal" | "both"
|
||||||
|
resize: Var[LiteralTextAreaResize]
|
||||||
|
|
||||||
# The color of the text area
|
# The color of the text area
|
||||||
color_scheme: Var[LiteralAccentColor]
|
color_scheme: Var[LiteralAccentColor]
|
||||||
|
|
||||||
|
# The radius of the text area: "none" | "small" | "medium" | "large" | "full"
|
||||||
|
radius: Var[LiteralRadius]
|
||||||
|
|
||||||
# Whether the form control should have autocomplete enabled
|
# Whether the form control should have autocomplete enabled
|
||||||
auto_complete: Var[bool]
|
auto_complete: Var[bool]
|
||||||
|
|
||||||
|
@ -13,9 +13,10 @@ from reflex.components.component import Component
|
|||||||
from reflex.components.core.debounce import DebounceInput
|
from reflex.components.core.debounce import DebounceInput
|
||||||
from reflex.constants import EventTriggers
|
from reflex.constants import EventTriggers
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import LiteralAccentColor, RadixThemesComponent
|
from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
|
||||||
|
|
||||||
LiteralTextAreaSize = Literal["1", "2", "3"]
|
LiteralTextAreaSize = Literal["1", "2", "3"]
|
||||||
|
LiteralTextAreaResize = Literal["none", "vertical", "horizontal", "both"]
|
||||||
|
|
||||||
class TextArea(RadixThemesComponent, el.Textarea):
|
class TextArea(RadixThemesComponent, el.Textarea):
|
||||||
@overload
|
@overload
|
||||||
@ -32,6 +33,12 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
Literal["classic", "surface", "soft"],
|
Literal["classic", "surface", "soft"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
resize: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["none", "vertical", "horizontal", "both"]],
|
||||||
|
Literal["none", "vertical", "horizontal", "both"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
color_scheme: Optional[
|
color_scheme: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[
|
Var[
|
||||||
@ -94,6 +101,12 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
radius: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["none", "small", "medium", "large", "full"]],
|
||||||
|
Literal["none", "small", "medium", "large", "full"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
auto_complete: Optional[Union[Var[bool], bool]] = None,
|
auto_complete: Optional[Union[Var[bool], bool]] = None,
|
||||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||||
dirname: Optional[Union[Var[str], str]] = None,
|
dirname: Optional[Union[Var[str], str]] = None,
|
||||||
@ -219,7 +232,9 @@ class TextArea(RadixThemesComponent, el.Textarea):
|
|||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
size: The size of the text area: "1" | "2" | "3"
|
size: The size of the text area: "1" | "2" | "3"
|
||||||
variant: The variant of the text area
|
variant: The variant of the text area
|
||||||
|
resize: The resize behavior of the text area: "none" | "vertical" | "horizontal" | "both"
|
||||||
color_scheme: The color of the text area
|
color_scheme: The color of the text area
|
||||||
|
radius: The radius of the text area: "none" | "small" | "medium" | "large" | "full"
|
||||||
auto_complete: Whether the form control should have autocomplete enabled
|
auto_complete: Whether the form control should have autocomplete enabled
|
||||||
auto_focus: Automatically focuses the textarea when the page loads
|
auto_focus: Automatically focuses the textarea when the page loads
|
||||||
dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
|
dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
|
||||||
|
Loading…
Reference in New Issue
Block a user