Skip to content

Commit 7a12fe2

Browse files
carlosabadiamasenf
andauthored
include resize and radius props to the text area component (#3383)
* include resize and radius props to the text area component * run scripts/make_pyi.py for text_area * pre-commit fixup --------- Co-authored-by: Masen Furer <m_github@0x26.net>
1 parent b04e3a6 commit 7a12fe2

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

reflex/components/radix/themes/components/text_area.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99

1010
from ..base import (
1111
LiteralAccentColor,
12+
LiteralRadius,
1213
RadixThemesComponent,
1314
)
1415

1516
LiteralTextAreaSize = Literal["1", "2", "3"]
1617

18+
LiteralTextAreaResize = Literal["none", "vertical", "horizontal", "both"]
19+
1720

1821
class TextArea(RadixThemesComponent, elements.Textarea):
1922
"""The input part of a TextArea, may be used by itself."""
@@ -26,9 +29,15 @@ class TextArea(RadixThemesComponent, elements.Textarea):
2629
# The variant of the text area
2730
variant: Var[Literal["classic", "surface", "soft"]]
2831

32+
# The resize behavior of the text area: "none" | "vertical" | "horizontal" | "both"
33+
resize: Var[LiteralTextAreaResize]
34+
2935
# The color of the text area
3036
color_scheme: Var[LiteralAccentColor]
3137

38+
# The radius of the text area: "none" | "small" | "medium" | "large" | "full"
39+
radius: Var[LiteralRadius]
40+
3241
# Whether the form control should have autocomplete enabled
3342
auto_complete: Var[bool]
3443

reflex/components/radix/themes/components/text_area.pyi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ from reflex.components.core.debounce import DebounceInput
1313
from reflex.components.el import elements
1414
from reflex.constants import EventTriggers
1515
from reflex.vars import Var
16-
from ..base import LiteralAccentColor, RadixThemesComponent
16+
from ..base import LiteralAccentColor, LiteralRadius, RadixThemesComponent
1717

1818
LiteralTextAreaSize = Literal["1", "2", "3"]
19+
LiteralTextAreaResize = Literal["none", "vertical", "horizontal", "both"]
1920

2021
class TextArea(RadixThemesComponent, elements.Textarea):
2122
@overload
@@ -32,6 +33,12 @@ class TextArea(RadixThemesComponent, elements.Textarea):
3233
Literal["classic", "surface", "soft"],
3334
]
3435
] = None,
36+
resize: Optional[
37+
Union[
38+
Var[Literal["none", "vertical", "horizontal", "both"]],
39+
Literal["none", "vertical", "horizontal", "both"],
40+
]
41+
] = None,
3542
color_scheme: Optional[
3643
Union[
3744
Var[
@@ -94,6 +101,12 @@ class TextArea(RadixThemesComponent, elements.Textarea):
94101
],
95102
]
96103
] = None,
104+
radius: Optional[
105+
Union[
106+
Var[Literal["none", "small", "medium", "large", "full"]],
107+
Literal["none", "small", "medium", "large", "full"],
108+
]
109+
] = None,
97110
auto_complete: Optional[Union[Var[bool], bool]] = None,
98111
auto_focus: Optional[Union[Var[bool], bool]] = None,
99112
dirname: Optional[Union[Var[str], str]] = None,
@@ -219,7 +232,9 @@ class TextArea(RadixThemesComponent, elements.Textarea):
219232
*children: The children of the component.
220233
size: The size of the text area: "1" | "2" | "3"
221234
variant: The variant of the text area
235+
resize: The resize behavior of the text area: "none" | "vertical" | "horizontal" | "both"
222236
color_scheme: The color of the text area
237+
radius: The radius of the text area: "none" | "small" | "medium" | "large" | "full"
223238
auto_complete: Whether the form control should have autocomplete enabled
224239
auto_focus: Automatically focuses the textarea when the page loads
225240
dirname: Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted

0 commit comments

Comments
 (0)