{# Data Card Component (mobile-optimized list item) Params: title: string (required) — main title subtitle: string (optional) meta: string (optional) — tertiary text (e.g. date) url: string (optional) — makes card clickable status_badge: hash (optional) — { label: string, variant: string } badges: array (optional) — [{ label: string, variant: string }] data_pairs: array (optional) — [{ label: string, value: string }] accent: string (optional, default: 'navy') — navy|coral|gold|green|danger class: string (optional) #} {% set _accent = accent|default('navy') %} {% set _tag = url is defined and url ? 'a' : 'div' %} <{{ _tag }}{% if url is defined and url %} href="{{ url }}"{% endif %} class="m-data-card m-data-card--{{ _accent }}{{ class is defined and class ? ' ' ~ class : '' }}">

{{ title }}

{% if subtitle is defined and subtitle %}

{{ subtitle }}

{% endif %} {% if meta is defined and meta %}

{{ meta }}

{% endif %}
{% if status_badge is defined and status_badge %} {% include 'components/_status_badge.html.twig' with { label: status_badge.label, variant: status_badge.variant, size: 'sm' } only %} {% endif %} {% if badges is defined and badges %} {% for badge in badges %} {% include 'components/_status_badge.html.twig' with { label: badge.label, variant: badge.variant, size: 'sm' } only %} {% endfor %} {% endif %}
{% if data_pairs is defined and data_pairs|length > 0 %}
{% for pair in data_pairs %}
{{ pair.label }} {{ pair.value }}
{% endfor %}
{% endif %}