minor update to callout (#2466)
* minor update to callout * pyi changes --------- Co-authored-by: Tom Gotsman <tomgotsman@toms-mbp.lan>
This commit is contained in:
parent
52d2bccbca
commit
8203b888fe
@ -13,7 +13,7 @@ from .aspectratio import AspectRatio
|
|||||||
from .avatar import Avatar
|
from .avatar import Avatar
|
||||||
from .badge import Badge
|
from .badge import Badge
|
||||||
from .button import Button
|
from .button import Button
|
||||||
from .callout import CalloutIcon, CalloutRoot, CalloutText
|
from .callout import Callout, CalloutIcon, CalloutRoot, CalloutText
|
||||||
from .card import Card
|
from .card import Card
|
||||||
from .checkbox import Checkbox, HighLevelCheckbox
|
from .checkbox import Checkbox, HighLevelCheckbox
|
||||||
from .contextmenu import (
|
from .contextmenu import (
|
||||||
@ -103,6 +103,7 @@ button = Button.create
|
|||||||
callout_root = CalloutRoot.create
|
callout_root = CalloutRoot.create
|
||||||
callout_icon = CalloutIcon.create
|
callout_icon = CalloutIcon.create
|
||||||
callout_text = CalloutText.create
|
callout_text = CalloutText.create
|
||||||
|
callout = Callout.create
|
||||||
|
|
||||||
# Card
|
# Card
|
||||||
card = Card.create
|
card = Card.create
|
||||||
|
@ -10,10 +10,11 @@ from reflex.vars import Var
|
|||||||
from ..base import (
|
from ..base import (
|
||||||
CommonMarginProps,
|
CommonMarginProps,
|
||||||
LiteralAccentColor,
|
LiteralAccentColor,
|
||||||
LiteralVariant,
|
|
||||||
RadixThemesComponent,
|
RadixThemesComponent,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CalloutVariant = Literal["soft", "surface", "outline"]
|
||||||
|
|
||||||
|
|
||||||
class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
||||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||||
@ -23,11 +24,11 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
# Change the default rendered element for the one passed as a child, merging their props and behavior.
|
||||||
as_child: Var[bool]
|
as_child: Var[bool]
|
||||||
|
|
||||||
# Button size "1" - "4"
|
# Size "1" - "3"
|
||||||
size: Var[Literal["1", "2", "3"]]
|
size: Var[Literal["1", "2", "3"]]
|
||||||
|
|
||||||
# Variant of button: "solid" | "soft" | "outline" | "ghost"
|
# Variant of button: "soft" | "surface" | "outline"
|
||||||
variant: Var[LiteralVariant]
|
variant: Var[CalloutVariant]
|
||||||
|
|
||||||
# Override theme color for button
|
# Override theme color for button
|
||||||
color: Var[LiteralAccentColor]
|
color: Var[LiteralAccentColor]
|
||||||
@ -75,6 +76,3 @@ class Callout(CalloutRoot):
|
|||||||
CalloutText.create(text),
|
CalloutText.create(text),
|
||||||
**props,
|
**props,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
callout = Callout.create
|
|
||||||
|
@ -13,12 +13,9 @@ from reflex import el
|
|||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.components.radix.themes.components.icons import Icon
|
from reflex.components.radix.themes.components.icons import Icon
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
from ..base import (
|
from ..base import CommonMarginProps, LiteralAccentColor, RadixThemesComponent
|
||||||
CommonMarginProps,
|
|
||||||
LiteralAccentColor,
|
CalloutVariant = Literal["soft", "surface", "outline"]
|
||||||
LiteralVariant,
|
|
||||||
RadixThemesComponent,
|
|
||||||
)
|
|
||||||
|
|
||||||
class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
||||||
@overload
|
@overload
|
||||||
@ -95,8 +92,8 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
] = None,
|
] = None,
|
||||||
variant: Optional[
|
variant: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
|
Var[Literal["soft", "surface", "outline"]],
|
||||||
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
Literal["soft", "surface", "outline"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||||
@ -248,8 +245,8 @@ class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
|
|||||||
color: map to CSS default color property.
|
color: map to CSS default color property.
|
||||||
color_scheme: map to radix color property.
|
color_scheme: map to radix color property.
|
||||||
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.
|
||||||
size: Button size "1" - "4"
|
size: Size "1" - "3"
|
||||||
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
variant: Variant of button: "soft" | "surface" | "outline"
|
||||||
high_contrast: Whether to render the button with higher contrast color against background
|
high_contrast: Whether to render the button with higher contrast color against background
|
||||||
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.
|
||||||
@ -808,8 +805,8 @@ class Callout(CalloutRoot):
|
|||||||
] = None,
|
] = None,
|
||||||
variant: Optional[
|
variant: Optional[
|
||||||
Union[
|
Union[
|
||||||
Var[Literal["classic", "solid", "soft", "surface", "outline", "ghost"]],
|
Var[Literal["soft", "surface", "outline"]],
|
||||||
Literal["classic", "solid", "soft", "surface", "outline", "ghost"],
|
Literal["soft", "surface", "outline"],
|
||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
color: Optional[
|
color: Optional[
|
||||||
@ -1020,8 +1017,8 @@ class Callout(CalloutRoot):
|
|||||||
text: The text of the callout.
|
text: The text of the callout.
|
||||||
icon: The icon of the callout.
|
icon: The icon of the callout.
|
||||||
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.
|
||||||
size: Button size "1" - "4"
|
size: Size "1" - "3"
|
||||||
variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
|
variant: Variant of button: "soft" | "surface" | "outline"
|
||||||
color: Override theme color for button
|
color: Override theme color for button
|
||||||
high_contrast: Whether to render the button with higher contrast color against background
|
high_contrast: Whether to render the button with higher contrast color against background
|
||||||
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.
|
||||||
@ -1060,5 +1057,3 @@ class Callout(CalloutRoot):
|
|||||||
The callout component.
|
The callout component.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
callout = Callout.create
|
|
||||||
|
Loading…
Reference in New Issue
Block a user