"""Autogenerated file: DO NOT EDIT!"""
import typing # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED # noqa: F401
[docs]class Toast(Component):
"""
Display a message over the ui that will disappears after a delay.
:CSS:
- ``dazzler-extra-toast``
- ``opened``
- ``toast-inner``
- ``top``
- ``top-left``
- ``top-right``
- ``bottom``
- ``bottom-left``
- ``bottom-right``
- ``right``
"""
message = Aspect(required=True, docstring="What to show in the toast.")
delay = Aspect(default=3000, docstring="Delay in milliseconds before the toast is automatically closed. (default=3000)") # noqa: E501
position = Aspect(default="'top'", docstring="Where the toast will be display. (Possible values: 'top', 'top-left', 'top-right', 'left', 'right', 'bottom', 'bottom-left', 'bottom-right', 'center') (default="'top'")") # noqa: E501
opened = Aspect(default=True, docstring="To display the toast for the delay. (default=True)") # noqa: E501
class_name = Aspect(docstring="Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become ``dazzler-core-container``.When added on the component, the class names will be concatenated.") # noqa: E501
style = Aspect(docstring="Style object for the top level wrapper of the component.") # noqa: E501
[docs] def __init__(
self,
message: typing.Any,
delay: typing.Optional[typing.Union[float, int]] = 3000,
position: typing.Optional[typing.Any] = "'top'",
opened: typing.Optional[bool] = True,
class_name: typing.Optional[str] = UNDEFINED,
style: typing.Optional[typing.Dict] = UNDEFINED,
identity: str = None
):
"""
:param message: What to show in the toast.
:param delay: Delay in milliseconds before the toast is
automatically closed. (default=3000)
:param position: Where the toast will be display. (Possible values:
'top', 'top-left', 'top-right', 'left', 'right', 'bottom', 'bottom-
left', 'bottom-right', 'center') (default="'top'")
:param opened: To display the toast for the delay. (default=True)
:param class_name: Class name automatically added by dazzler api
with a prefix for the component library. ie: core component
Container become ``dazzler-core-container``. When added on the
component, the class names will be concatenated.
:param style: Style object for the top level wrapper of the
component.
"""
Component.__init__(self, locals(), identity)