|
@@ -3,7 +3,7 @@
|
|
# ------------------- DO NOT EDIT ----------------------
|
|
# ------------------- DO NOT EDIT ----------------------
|
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
# This file was generated by `reflex/utils/pyi_generator.py`!
|
|
# ------------------------------------------------------
|
|
# ------------------------------------------------------
|
|
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
|
|
|
|
|
|
+from typing import Any, Callable, ClassVar, Dict, Literal, Optional, Union, overload
|
|
|
|
|
|
from reflex.base import Base
|
|
from reflex.base import Base
|
|
from reflex.components.component import Component, ComponentNamespace
|
|
from reflex.components.component import Component, ComponentNamespace
|
|
@@ -52,9 +52,13 @@ class ToastProps(PropsBase):
|
|
def dict(self, *args, **kwargs) -> dict[str, Any]: ...
|
|
def dict(self, *args, **kwargs) -> dict[str, Any]: ...
|
|
|
|
|
|
class Toaster(Component):
|
|
class Toaster(Component):
|
|
|
|
+ is_used: ClassVar[bool] = False
|
|
|
|
+
|
|
def add_hooks(self) -> list[Var | str]: ...
|
|
def add_hooks(self) -> list[Var | str]: ...
|
|
@staticmethod
|
|
@staticmethod
|
|
- def send_toast(message: str, level: str | None = None, **props) -> EventSpec: ...
|
|
|
|
|
|
+ def send_toast(
|
|
|
|
+ message: str = "", level: str | None = None, **props
|
|
|
|
+ ) -> EventSpec: ...
|
|
@staticmethod
|
|
@staticmethod
|
|
def toast_info(message: str, **kwargs): ...
|
|
def toast_info(message: str, **kwargs): ...
|
|
@staticmethod
|
|
@staticmethod
|
|
@@ -158,10 +162,10 @@ class Toaster(Component):
|
|
] = None,
|
|
] = None,
|
|
**props,
|
|
**props,
|
|
) -> "Toaster":
|
|
) -> "Toaster":
|
|
- """Create the component.
|
|
|
|
|
|
+ """Create a toaster component.
|
|
|
|
|
|
Args:
|
|
Args:
|
|
- *children: The children of the component.
|
|
|
|
|
|
+ *children: The children of the toaster.
|
|
theme: the theme of the toast
|
|
theme: the theme of the toast
|
|
rich_colors: whether to show rich colors
|
|
rich_colors: whether to show rich colors
|
|
expand: whether to expand the toast
|
|
expand: whether to expand the toast
|
|
@@ -182,10 +186,10 @@ class Toaster(Component):
|
|
class_name: The class name for the component.
|
|
class_name: The class name for the component.
|
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
autofocus: Whether the component should take the focus once the page is loaded
|
|
custom_attrs: custom attribute
|
|
custom_attrs: custom attribute
|
|
- **props: The props of the component.
|
|
|
|
|
|
+ **props: The properties of the toaster.
|
|
|
|
|
|
Returns:
|
|
Returns:
|
|
- The component.
|
|
|
|
|
|
+ The toaster component.
|
|
"""
|
|
"""
|
|
...
|
|
...
|
|
|
|
|
|
@@ -200,7 +204,7 @@ class ToastNamespace(ComponentNamespace):
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|
|
def __call__(
|
|
def __call__(
|
|
- message: str, level: Optional[str] = None, **props
|
|
|
|
|
|
+ message: str = "", level: Optional[str] = None, **props
|
|
) -> "Optional[EventSpec]":
|
|
) -> "Optional[EventSpec]":
|
|
"""Send a toast message.
|
|
"""Send a toast message.
|
|
|
|
|
|
@@ -209,6 +213,9 @@ class ToastNamespace(ComponentNamespace):
|
|
level: The level of the toast.
|
|
level: The level of the toast.
|
|
**props: The options for the toast.
|
|
**props: The options for the toast.
|
|
|
|
|
|
|
|
+ Raises:
|
|
|
|
+ ValueError: If the Toaster component is not created.
|
|
|
|
+
|
|
Returns:
|
|
Returns:
|
|
The toast event.
|
|
The toast event.
|
|
"""
|
|
"""
|