Skip to content

wakeup_component

fastagency.ui.mesop.timer.wakeup_component #

wakeup_component(
    *,
    on_wakeup: Callable[[WebEvent], Any],
    key: Optional[str] = None
) -> Any
Source code in fastagency/ui/mesop/timer.py
@mel.web_component(path=MEL_WEB_COMPONENT_PATH)  # type: ignore[misc]
def wakeup_component(
    *,
    on_wakeup: Callable[[mel.WebEvent], Any],
    key: Optional[str] = None,
) -> Any:
    return mel.insert_web_component(
        name="wakeup-component",
        key=key,
        events={
            "wakeupEvent": on_wakeup,
        },
        properties={},
    )