From 291bfdeacb4758b6d48f25bbe03f5c7e70621d10 Mon Sep 17 00:00:00 2001 From: Elijah Date: Wed, 23 Oct 2024 13:38:57 +0000 Subject: [PATCH] list fix --- reflex/components/radix/themes/layout/list.py | 4 +- .../components/radix/themes/layout/list.pyi | 80 ++++++++++--------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/reflex/components/radix/themes/layout/list.py b/reflex/components/radix/themes/layout/list.py index daf7f9a70..94922486e 100644 --- a/reflex/components/radix/themes/layout/list.py +++ b/reflex/components/radix/themes/layout/list.py @@ -42,9 +42,9 @@ class BaseList(Component): tag = "ul" # The style of the list. Default to "none". - list_style_type: Union[ + list_style_type: Optional[Union[ LiteralListStyleTypeUnordered, LiteralListStyleTypeOrdered - ] = "none" + ]] = "none" # A list of items to add to the list. items: Optional[Union[Iterable, Var[Iterable]]] = None diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi index 79147262e..3911e257c 100644 --- a/reflex/components/radix/themes/layout/list.pyi +++ b/reflex/components/radix/themes/layout/list.pyi @@ -35,25 +35,27 @@ class BaseList(Component): def create( # type: ignore cls, *children, - list_style_type: Union[ - Literal["circle", "disc", "none", "square"], - Literal[ - "armenian", - "decimal", - "decimal-leading-zero", - "georgian", - "hiragana", - "katakana", - "lower-alpha", - "lower-greek", - "lower-latin", - "lower-roman", - "none", - "upper-alpha", - "upper-latin", - "upper-roman", - ], - ] = "none", + list_style_type: Optional[ + Union[ + Literal[ + "armenian", + "decimal", + "decimal-leading-zero", + "georgian", + "hiragana", + "katakana", + "lower-alpha", + "lower-greek", + "lower-latin", + "lower-roman", + "none", + "upper-alpha", + "upper-latin", + "upper-roman", + ], + Literal["circle", "disc", "none", "square"], + ] + ] = None, items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -383,25 +385,27 @@ class List(ComponentNamespace): @staticmethod def __call__( *children, - list_style_type: Union[ - Literal["circle", "disc", "none", "square"], - Literal[ - "armenian", - "decimal", - "decimal-leading-zero", - "georgian", - "hiragana", - "katakana", - "lower-alpha", - "lower-greek", - "lower-latin", - "lower-roman", - "none", - "upper-alpha", - "upper-latin", - "upper-roman", - ], - ] = "none", + list_style_type: Optional[ + Union[ + Literal[ + "armenian", + "decimal", + "decimal-leading-zero", + "georgian", + "hiragana", + "katakana", + "lower-alpha", + "lower-greek", + "lower-latin", + "lower-roman", + "none", + "upper-alpha", + "upper-latin", + "upper-roman", + ], + Literal["circle", "disc", "none", "square"], + ] + ] = None, items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None, style: Optional[Style] = None, key: Optional[Any] = None,