Files
notifications-admin/app/templates/components/pill.html

28 lines
756 B
HTML
Raw Normal View History

{% from 'components/big-number.html' import big_number %}
{% macro pill(
items=[],
current_value=None,
big_number_args={'smaller': 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' tabindex='0'>
{% else %}
<li aria-selected='false' role='tab'>
<a href="{{ link }}">
{% endif %}
{{ big_number(count, **big_number_args) }}
<div class="pill-label">{{ label }}</div>
{% if current_value == option %}
</div>
{% else %}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}