{#- chirp-ui: Notification Dot Wraps any element with a pulsing notification indicator. Usage: from "chirpui/notification_dot.html" import notification_dot call notification_dot() end call notification_dot(variant="success", count=3) Messages end -#} {% def notification_dot(variant="", size="", count=none, aria_label=none, cls="") %} {% set variant = variant | validate_variant(("", "default", "error", "success", "warning"), "") %} {% set size = size | validate_variant(("", "sm", "md", "lg"), "") %} {% set variant_class = " chirpui-notification-dot--" ~ variant if variant else "" %} {% set size_class = " chirpui-notification-dot--" ~ size if size else "" %} {% set count_class = " chirpui-notification-dot--count" if count else "" %} {% set _label = aria_label if aria_label else (count | string ~ " notification" ~ ("s" if count != 1 else "") if count else "notification") %} {% slot %} {%- if count %}{{ count }}{% end -%} {% end %}