Flex props to support Lists (#1553)

This commit is contained in:
Elijah Ahianyo 2023-08-10 03:48:28 +00:00 committed by GitHub
parent 9f7a7a1e4a
commit 6c517a39df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,7 @@
"""A reflexive container component."""
from typing import List, Union
from reflex.components.libs.chakra import ChakraComponent
from reflex.vars import Var
@ -16,7 +18,7 @@ class Flex(ChakraComponent):
basis: Var[str]
# Shorthand for flexDirection style prop
direction: Var[str]
direction: Var[Union[str, List[str]]]
# Shorthand for flexGrow style prop
grow: Var[str]
@ -25,7 +27,7 @@ class Flex(ChakraComponent):
justify: Var[str]
# Shorthand for flexWrap style prop
wrap: Var[str]
wrap: Var[Union[str, List[str]]]
# Shorthand for flexShrink style prop
shrink: Var[str]