{#- chirp-ui: Alert component Status alerts with variant styling and optional dismiss. When collapsible=true, renders as
/ (collapsed by default if open=false). Named slot: actions (e.g. Retry button). Usage: from "chirpui/alert.html" import alert call alert(variant="success") Done! Your changes have been saved. end call alert(variant="error", dismissible=true) Something went wrong. {% slot actions %}{% end %} end call alert(variant="warning", collapsible=true, open=false, icon="↑", title="Shortcut collisions") Long warning content revealed on expand. end Variants: info (default), success, warning, error -#} {% def alert(variant="info", dismissible=false, icon=none, title=none, cls="", collapsible=false, open=true) %} {% set alert_class = "alert" | bem(variant=variant, cls=cls) %} {% if collapsible %} {% else %} {% endif %} {% end %}