{# @description A trend stat set on the centre line: the icon on top, the figure, what it counts beneath it, then the change. For a band of figures or a panel that stands alone. #} {# @prop title:text | description:"What the figure counts" #} {# @prop value:text | description:"The figure itself, already formatted" #} {# @prop change:text | description:"The size of the move, already formatted: 12%, 4, €1.2k. Left out, no arrow is drawn." #} {# @prop direction:select['up', 'down', 'flat'] | default:"up" | description:"Which way the figure moved" #} {# @prop inverse:boolean | default:False | description:"Set where a fall is the good news: lead time, failures, cost. It swaps which direction is coloured as good." #} {# @prop desc:text | description:"What the change is measured against: since last month" #} {# @prop icon:text | description:"An icon, by the name the project's icon component knows it by. Left out, there is no icon." #} {# @prop class:text | description:"Extra classes on the stat" #} {# @slot:figure — In place of the icon, for anything that is not one: a picture, a logo, an avatar. #} {% comment %} Built on daisy-cotton's stat. The title comes after the figure here, so the number is what is met first. {% endcomment %} {% if icon or figure %}{% if figure %}{{ figure }}{% else %}{% endif %} {{ value }} {% if title or change or desc %}
{% if title %}{{ title }}{% endif %} {% if change or desc %} {% if change %}{% endif %} {% if desc %}{{ desc }}{% endif %} {% endif %}
{% endif %}