From 6c517a39df8ff6f914047ed34ae03a8f3d7a33ef Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Thu, 10 Aug 2023 03:48:28 +0000 Subject: [PATCH] Flex props to support Lists (#1553) --- reflex/components/layout/flex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reflex/components/layout/flex.py b/reflex/components/layout/flex.py index ab1f24d67..73cd01e32 100644 --- a/reflex/components/layout/flex.py +++ b/reflex/components/layout/flex.py @@ -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]