mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-09 21:04:14 -05:00
When the text is left aligned it looks messy because the spacing is so uneven and there are no big numbers to give it some rhythm.
31 lines
929 B
HTML
31 lines
929 B
HTML
{% from 'components/big-number.html' import big_number %}
|
|
|
|
{% macro pill(
|
|
items=[],
|
|
current_value=None,
|
|
big_number_args={'smaller': True},
|
|
show_count=True
|
|
) %}
|
|
<ul role='tablist' class='pill'>
|
|
{% for label, option, link, count in items %}
|
|
{% if current_value == option %}
|
|
<li aria-selected='true' role='tab'>
|
|
<div class='pill-selected-item{% if not show_count %} pill-centered-item{% endif %}' tabindex='0'>
|
|
{% else %}
|
|
<li aria-selected='false' role='tab'>
|
|
<a href="{{ link }}">
|
|
{% endif %}
|
|
{% if show_count %}
|
|
{{ big_number(count, **big_number_args) }}
|
|
{% endif %}
|
|
<div class="pill-label{% if not show_count %} pill-centered-item{% endif %}">{{ label }}</div>
|
|
{% if current_value == option %}
|
|
</div>
|
|
{% else %}
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|