add props for tabs (#3560)
This commit is contained in:
parent
31bd75ff39
commit
cca037421b
@ -31,6 +31,12 @@ class TabsRoot(RadixThemesComponent):
|
||||
# The orientation of the tabs.
|
||||
orientation: Var[Literal["horizontal", "vertical"]]
|
||||
|
||||
# Reading direction of the tabs.
|
||||
dir: Var[Literal["ltr", "rtl"]]
|
||||
|
||||
# The mode of activation for the tabs. "automatic" will activate the tab when focused. "manual" will activate the tab when clicked.
|
||||
activation_mode: Var[Literal["automatic", "manual"]]
|
||||
|
||||
# Props to rename
|
||||
_rename_props = {"onChange": "onValueChange"}
|
||||
|
||||
@ -58,6 +64,9 @@ class TabsList(RadixThemesComponent):
|
||||
# Tabs size "1" - "2"
|
||||
size: Var[Literal["1", "2"]]
|
||||
|
||||
# When true, the tabs will loop when reaching the end.
|
||||
loop: Var[bool]
|
||||
|
||||
def add_style(self):
|
||||
"""Add style for the component.
|
||||
|
||||
@ -124,6 +133,9 @@ class TabsContent(RadixThemesComponent):
|
||||
# The value of the tab. Must be unique for each tab.
|
||||
value: Var[str]
|
||||
|
||||
# Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
|
||||
force_mount: Var[bool]
|
||||
|
||||
def add_style(self) -> dict[str, Any] | None:
|
||||
"""Add style for the component.
|
||||
|
||||
|
@ -31,6 +31,10 @@ class TabsRoot(RadixThemesComponent):
|
||||
Literal["horizontal", "vertical"],
|
||||
]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
|
||||
activation_mode: Optional[
|
||||
Union[Var[Literal["automatic", "manual"]], Literal["automatic", "manual"]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -97,6 +101,8 @@ class TabsRoot(RadixThemesComponent):
|
||||
default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs.
|
||||
value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs.
|
||||
orientation: The orientation of the tabs.
|
||||
dir: Reading direction of the tabs.
|
||||
activation_mode: The mode of activation for the tabs. "automatic" will activate the tab when focused. "manual" will activate the tab when clicked.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -118,6 +124,7 @@ class TabsList(RadixThemesComponent):
|
||||
cls,
|
||||
*children,
|
||||
size: Optional[Union[Var[Literal["1", "2"]], Literal["1", "2"]]] = None,
|
||||
loop: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -179,6 +186,7 @@ class TabsList(RadixThemesComponent):
|
||||
Args:
|
||||
*children: Child components.
|
||||
size: Tabs size "1" - "2"
|
||||
loop: When true, the tabs will loop when reaching the end.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -345,6 +353,7 @@ class TabsContent(RadixThemesComponent):
|
||||
cls,
|
||||
*children,
|
||||
value: Optional[Union[Var[str], str]] = None,
|
||||
force_mount: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -406,6 +415,7 @@ class TabsContent(RadixThemesComponent):
|
||||
Args:
|
||||
*children: Child components.
|
||||
value: The value of the tab. Must be unique for each tab.
|
||||
force_mount: Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -436,6 +446,10 @@ class Tabs(ComponentNamespace):
|
||||
Literal["horizontal", "vertical"],
|
||||
]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Literal["ltr", "rtl"]], Literal["ltr", "rtl"]]] = None,
|
||||
activation_mode: Optional[
|
||||
Union[Var[Literal["automatic", "manual"]], Literal["automatic", "manual"]]
|
||||
] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -502,6 +516,8 @@ class Tabs(ComponentNamespace):
|
||||
default_value: The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs.
|
||||
value: The controlled value of the tab that should be active. Use when you need to control the state of the tabs.
|
||||
orientation: The orientation of the tabs.
|
||||
dir: Reading direction of the tabs.
|
||||
activation_mode: The mode of activation for the tabs. "automatic" will activate the tab when focused. "manual" will activate the tab when clicked.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
|
Loading…
Reference in New Issue
Block a user