Source code for dazzler.components.extra._pop_up
"""Autogenerated file: DO NOT EDIT!"""
import typing # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED # noqa: F401
[docs]class PopUp(Component):
"""
Wraps a component/text to render a popup when hovering
over the children or clicking on it.
:CSS:
- ``dazzler-extra-pop-up``
- ``popup-content``
- ``visible``
"""
children = Aspect(required=True, docstring="Component/text to wrap with a popup on hover/click.") # noqa: E501
content = Aspect(required=True, docstring="Content of the popup info.")
active = Aspect(default=False, docstring="Is the popup currently active. (default=False)") # noqa: E501
mode = Aspect(default="'hover'", docstring="Show popup on hover or click. (Possible values: 'hover', 'click') (default="'hover'")") # noqa: E501
content_style = Aspect(docstring="Style for the popup.")
children_style = Aspect(docstring="Style for the wrapped children.")
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,
children: typing.Any,
content: typing.Any,
active: typing.Optional[bool] = False,
mode: typing.Optional[typing.Any] = "'hover'",
content_style: typing.Optional[typing.Dict] = UNDEFINED,
children_style: typing.Optional[typing.Dict] = UNDEFINED,
class_name: typing.Optional[str] = UNDEFINED,
style: typing.Optional[typing.Dict] = UNDEFINED,
identity: str = None
):
"""
:param children: Component/text to wrap with a popup on
hover/click.
:param content: Content of the popup info.
:param active: Is the popup currently active. (default=False)
:param mode: Show popup on hover or click. (Possible values:
'hover', 'click') (default="'hover'")
:param content_style: Style for the popup.
:param children_style: Style for the wrapped children.
: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)