Use align start by default stacks (#2619)
This commit is contained in:
parent
39486386f4
commit
80c62da062
@ -30,7 +30,7 @@ class Input(ChakraComponent):
|
|||||||
placeholder: Var[str]
|
placeholder: Var[str]
|
||||||
|
|
||||||
# The type of input.
|
# The type of input.
|
||||||
type_: Var[LiteralInputType] = "text" # type: ignore
|
type_: Var[LiteralInputType]
|
||||||
|
|
||||||
# The border color when the input is invalid.
|
# The border color when the input is invalid.
|
||||||
error_border_color: Var[str]
|
error_border_color: Var[str]
|
||||||
|
@ -19,8 +19,6 @@ class Stack(Flex):
|
|||||||
def create(
|
def create(
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
justify: LiteralJustify = "start",
|
|
||||||
align: LiteralAlign = "center",
|
|
||||||
spacing: LiteralSize = "2",
|
spacing: LiteralSize = "2",
|
||||||
**props,
|
**props,
|
||||||
) -> Component:
|
) -> Component:
|
||||||
@ -28,8 +26,6 @@ class Stack(Flex):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the stack.
|
*children: The children of the stack.
|
||||||
justify: The justify of the stack elements.
|
|
||||||
align: The alignment of the stack elements.
|
|
||||||
spacing: The spacing between each stack item.
|
spacing: The spacing between each stack item.
|
||||||
**props: The properties of the stack.
|
**props: The properties of the stack.
|
||||||
|
|
||||||
@ -38,8 +34,6 @@ class Stack(Flex):
|
|||||||
"""
|
"""
|
||||||
return super().create(
|
return super().create(
|
||||||
*children,
|
*children,
|
||||||
align=align,
|
|
||||||
justify=justify,
|
|
||||||
spacing=spacing,
|
spacing=spacing,
|
||||||
**props,
|
**props,
|
||||||
)
|
)
|
||||||
|
@ -21,8 +21,6 @@ class Stack(Flex):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
justify: Optional[LiteralJustify] = "start",
|
|
||||||
align: Optional[LiteralAlign] = "center",
|
|
||||||
spacing: Optional[LiteralSize] = "2",
|
spacing: Optional[LiteralSize] = "2",
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
direction: Optional[
|
direction: Optional[
|
||||||
@ -31,6 +29,18 @@ class Stack(Flex):
|
|||||||
Literal["row", "column", "row-reverse", "column-reverse"],
|
Literal["row", "column", "row-reverse", "column-reverse"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
align: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
||||||
|
Literal["start", "center", "end", "baseline", "stretch"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
justify: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "between"]],
|
||||||
|
Literal["start", "center", "end", "between"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
wrap: Optional[
|
wrap: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
||||||
@ -134,11 +144,11 @@ class Stack(Flex):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the stack.
|
*children: The children of the stack.
|
||||||
justify: The justify of the stack elements.
|
|
||||||
align: The alignment of the stack elements.
|
|
||||||
spacing: The spacing between each stack item.
|
spacing: The spacing between each stack item.
|
||||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
||||||
|
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
||||||
|
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
||||||
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
||||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
@ -175,8 +185,6 @@ class VStack(Stack):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
justify: Optional[LiteralJustify] = "start",
|
|
||||||
align: Optional[LiteralAlign] = "center",
|
|
||||||
spacing: Optional[LiteralSize] = "2",
|
spacing: Optional[LiteralSize] = "2",
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
direction: Optional[
|
direction: Optional[
|
||||||
@ -185,6 +193,18 @@ class VStack(Stack):
|
|||||||
Literal["row", "column", "row-reverse", "column-reverse"],
|
Literal["row", "column", "row-reverse", "column-reverse"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
align: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
||||||
|
Literal["start", "center", "end", "baseline", "stretch"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
justify: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "between"]],
|
||||||
|
Literal["start", "center", "end", "between"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
wrap: Optional[
|
wrap: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
||||||
@ -288,11 +308,11 @@ class VStack(Stack):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the stack.
|
*children: The children of the stack.
|
||||||
justify: The justify of the stack elements.
|
|
||||||
align: The alignment of the stack elements.
|
|
||||||
spacing: The spacing between each stack item.
|
spacing: The spacing between each stack item.
|
||||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
||||||
|
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
||||||
|
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
||||||
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
||||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
@ -329,8 +349,6 @@ class HStack(Stack):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
justify: Optional[LiteralJustify] = "start",
|
|
||||||
align: Optional[LiteralAlign] = "center",
|
|
||||||
spacing: Optional[LiteralSize] = "2",
|
spacing: Optional[LiteralSize] = "2",
|
||||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||||
direction: Optional[
|
direction: Optional[
|
||||||
@ -339,6 +357,18 @@ class HStack(Stack):
|
|||||||
Literal["row", "column", "row-reverse", "column-reverse"],
|
Literal["row", "column", "row-reverse", "column-reverse"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
|
align: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "baseline", "stretch"]],
|
||||||
|
Literal["start", "center", "end", "baseline", "stretch"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
justify: Optional[
|
||||||
|
Union[
|
||||||
|
Var[Literal["start", "center", "end", "between"]],
|
||||||
|
Literal["start", "center", "end", "between"],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
wrap: Optional[
|
wrap: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
Var[Literal["nowrap", "wrap", "wrap-reverse"]],
|
||||||
@ -442,11 +472,11 @@ class HStack(Stack):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the stack.
|
*children: The children of the stack.
|
||||||
justify: The justify of the stack elements.
|
|
||||||
align: The alignment of the stack elements.
|
|
||||||
spacing: The spacing between each stack item.
|
spacing: The spacing between each stack item.
|
||||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
direction: How child items are layed out: "row" | "column" | "row-reverse" | "column-reverse"
|
||||||
|
align: Alignment of children along the main axis: "start" | "center" | "end" | "baseline" | "stretch"
|
||||||
|
justify: Alignment of children along the cross axis: "start" | "center" | "end" | "between"
|
||||||
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
wrap: Whether children should wrap when they reach the end of their container: "nowrap" | "wrap" | "wrap-reverse"
|
||||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||||
|
Loading…
Reference in New Issue
Block a user