1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-10 13:22:22 +04:00
Files
tabler/preview/pages/_includes/ui/trending.html
T
Paweł Kuna cb278c762d Add segmented control component (#2087)
* Add segmented control component and update related files

* Implement segmented navigation component and update related styles

* Create grumpy-flowers-act.md

* Refactor .gitignore and move playground pages to preview directory

* Enhance segmented navigation with hover state and class support

* Refactor segmented control layout for improved responsiveness and alignment
2025-02-06 18:02:46 +01:00

16 lines
588 B
HTML

{% assign value = include.value | default: 25 %}
{% if value > 0 %}
{% assign trending-color = 'green' %}
{% assign trending-icon = 'trending-up' %}
{% elsif value == 0 %}
{% assign trending-color = 'yellow' %}
{% assign trending-icon = 'minus' %}
{% else %}
{% assign trending-color = 'red' %}
{% assign trending-icon = 'trending-down' %}
{% endif %}
<span class="text-{{ trending-color }} d-inline-flex align-items-center lh-1{% if include.class %} {{ include.class }}{% endif %}">
{{ value }}% {% include "ui/icon.html" icon=trending-icon class="ms-1" %}
</span>