{# Headline number plus period-over-period change. Green/red here are deliberate, unlike in widgets/donut.html which avoids them: a delta really is a good/bad signal, so it reads in the same colours as a success/danger toast. The arrow carries the direction too, so the meaning survives for anyone who cannot separate the two hues. #} {% from "admin/components/icons.html" import icon %}
{{ widget_data.value }}
{% if widget_data.direction == "up" %} {{ icon("arrow-up", "h-4 w-4") }}{{ widget_data.delta }}% {% elif widget_data.direction == "down" %} {{ icon("arrow-down", "h-4 w-4") }}{{ widget_data.delta }}% {% else %} {{ _("no change") }} {% endif %}