{# @description daisyUI's stat: title, value and description text, in that order, with an optional figure such as an icon and optional actions. A stat is always placed inside a stats group, even when it is alone. A value given as a number reaches the template as a number and renders as text; formatting it is the caller's job. #} {# @prop title:text | description:"Heading text, shown in stat-title. Fill the title slot instead for rich content such as an icon or badge." #} {# @prop value:text | description:"The figure itself, shown in stat-value. Fill the value slot instead for rich content. 0 renders; formatting a number is the caller's job." #} {# @prop desc:text | description:"Description text, shown in stat-desc. Fill the desc slot instead for rich content." #} {# @prop figure:text | description:"Content shown in stat-figure, such as an icon. Fill the figure slot for markup." #} {# @prop actions:text | description:"Content shown in stat-actions, usually buttons. Fill the actions slot for markup." #} {# @prop class:text | description:"Extra classes added to the stat." #} {# @slot:figure — Content in stat-figure, such as an icon hidden from assistive technology. #} {# @slot:title — A heading in place of the title attribute, for rich content such as an icon or badge. #} {# @slot:value — The value in place of the attribute, for rich content. #} {# @slot:desc — Description text in place of the attribute, for rich content. #} {# @slot:actions — Content in stat-actions, usually buttons. #}
{% if figure %}
{{ figure }}
{% endif %} {% if title %}
{{ title }}
{% endif %} {% if value or value == 0 %}
{{ value }}
{% endif %} {% if desc %}
{{ desc }}
{% endif %} {% if actions %}
{{ actions }}
{% endif %}