Accept suggestions
This commit is contained in:
parent
db143cfddf
commit
7ab15e23fd
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, List, Literal, Optional, Tuple, Union
|
||||
from typing import Any, List, Literal, Tuple, Union
|
||||
|
||||
from reflex.components.component import Component, ComponentNamespace
|
||||
from reflex.components.core.colors import color
|
||||
@ -194,9 +194,9 @@ class AccordionItem(AccordionComponent):
|
||||
disabled: Var[bool]
|
||||
|
||||
# The header of the accordion item.
|
||||
header: Optional[Union[Component, str, Var[Union[Component, str]]]] = None
|
||||
header: Var[Union[Component, str]] = Var.create(None)
|
||||
# The content of the accordion item.
|
||||
content: Optional[Union[Component, str, Var[Union[Component, str]]]] = None
|
||||
content: Var[Union[Component, str]] = Var.create(None)
|
||||
|
||||
_valid_children: List[str] = [
|
||||
"AccordionHeader",
|
||||
|
@ -304,12 +304,8 @@ class AccordionItem(AccordionComponent):
|
||||
*children,
|
||||
value: Optional[Union[Var[str], str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
header: Optional[
|
||||
Union[Component, Union[Component, Var[Union[Component, str]], str], str]
|
||||
] = None,
|
||||
content: Optional[
|
||||
Union[Component, Union[Component, Var[Union[Component, str]], str], str]
|
||||
] = None,
|
||||
header: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
||||
content: Optional[Union[Component, Var[Union[Component, str]], str]] = None,
|
||||
color_scheme: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
|
@ -116,7 +116,7 @@ class ColorModeIconButton(IconButton):
|
||||
The button component.
|
||||
"""
|
||||
position = props.pop("position", None)
|
||||
allow_system = props.pop("allow_system", None)
|
||||
allow_system = props.pop("allow_system", False)
|
||||
|
||||
# position is used to set nice defaults for positioning the icon button
|
||||
if isinstance(position, Var):
|
||||
|
@ -47,7 +47,7 @@ class BaseList(Component):
|
||||
] = "none"
|
||||
|
||||
# A list of items to add to the list.
|
||||
items: Optional[Union[Iterable, Var[Iterable]]] = None
|
||||
items: Var[Iterable] = Var.create([])
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
@ -99,9 +99,6 @@ class UnorderedList(BaseList, Ul):
|
||||
|
||||
tag = "ul"
|
||||
|
||||
# The style of the list.
|
||||
list_style_type: LiteralListStyleTypeUnordered = "disc"
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
cls,
|
||||
@ -132,9 +129,6 @@ class OrderedList(BaseList, Ol):
|
||||
|
||||
tag = "ol"
|
||||
|
||||
# The style of the list.
|
||||
list_style_type: LiteralListStyleTypeOrdered = "decimal"
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
cls,
|
||||
|
@ -56,7 +56,7 @@ class BaseList(Component):
|
||||
Literal["circle", "disc", "none", "square"],
|
||||
]
|
||||
] = None,
|
||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
||||
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -108,8 +108,28 @@ class UnorderedList(BaseList, Ul):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
list_style_type: Optional[LiteralListStyleTypeUnordered] = None,
|
||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = 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, Var[Iterable]]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
@ -199,8 +219,28 @@ class OrderedList(BaseList, Ol):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
list_style_type: Optional[LiteralListStyleTypeOrdered] = None,
|
||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = 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, Var[Iterable]]] = None,
|
||||
reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
start: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
@ -406,7 +446,7 @@ class List(ComponentNamespace):
|
||||
Literal["circle", "disc", "none", "square"],
|
||||
]
|
||||
] = None,
|
||||
items: Optional[Union[Iterable, Union[Iterable, Var[Iterable]]]] = None,
|
||||
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
Loading…
Reference in New Issue
Block a user