This commit is contained in:
Elijah 2024-10-23 13:38:57 +00:00
parent a705b3d639
commit 291bfdeacb
2 changed files with 44 additions and 40 deletions

View File

@ -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

View File

@ -35,8 +35,8 @@ class BaseList(Component):
def create( # type: ignore
cls,
*children,
list_style_type: Union[
Literal["circle", "disc", "none", "square"],
list_style_type: Optional[
Union[
Literal[
"armenian",
"decimal",
@ -53,7 +53,9 @@ class BaseList(Component):
"upper-latin",
"upper-roman",
],
] = "none",
Literal["circle", "disc", "none", "square"],
]
] = None,
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
@ -383,8 +385,8 @@ class List(ComponentNamespace):
@staticmethod
def __call__(
*children,
list_style_type: Union[
Literal["circle", "disc", "none", "square"],
list_style_type: Optional[
Union[
Literal[
"armenian",
"decimal",
@ -401,7 +403,9 @@ class List(ComponentNamespace):
"upper-latin",
"upper-roman",
],
] = "none",
Literal["circle", "disc", "none", "square"],
]
] = None,
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,