Add index on tabs (#2225)

* Add index on tabs
---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
This commit is contained in:
Alek Petuskey 2023-11-27 17:59:35 -08:00 committed by GitHub
parent 527437cf23
commit 065b1b88d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,9 @@ class Tabs(ChakraComponent):
# The color scheme of the tabs.
color_scheme: Var[LiteralColorScheme]
# Index of the selected tab (in controlled mode).
index: Var[int]
@classmethod
def create(
cls, *children, items: Optional[List[Tuple[str, str]]] = None, **props

View File

@ -106,6 +106,7 @@ class Tabs(ChakraComponent):
],
]
] = None,
index: Optional[Union[Var[int], int]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
@ -173,6 +174,7 @@ class Tabs(ChakraComponent):
orientation: The orientation of the tab list.
variant: "line" | "enclosed" | "enclosed-colored" | "soft-rounded" | "solid-rounded" | "unstyled"
color_scheme: The color scheme of the tabs.
index: Index of the selected tab (in controlled mode).
style: The style of the component.
key: A unique key for the component.
id: The id for the component.