Skip to content

Commit 5eb7808

Browse files
authored
fix: tracker component accepts class param (#1579)
1 parent 0352499 commit 5eb7808

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/components/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ Let's explore a more sophisticated example that demonstrates how multiple compon
7373
| unfold/components/table.html | Table | table, card_included, striped |
7474
| unfold/components/text.html | Paragraph of text | class |
7575
| unfold/components/title.html | Basic heading element | class |
76-
| unfold/components/tracker.html | Tracker component | data |
76+
| unfold/components/tracker.html | Tracker component | class, data |
77+
| unfold/components/layer.html | Abstract components wrapper | |

src/unfold/templates/unfold/components/tracker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ul class="flex flex-row gap-0.5 overflow-hidden rounded-default">
1+
<ul class="flex flex-row gap-0.5 overflow-hidden rounded-default {% if class %}{{ class }}{% endif %}">
22
{% for item in data %}
33
<li class="h-8 px-px size-full {% if item.color %}{{ item.color }}{% else %}bg-base-300 dark:bg-base-400{% endif %} hover:opacity-50" title="{{ item.tooltip }}"></li>
44
{% endfor %}

0 commit comments

Comments
 (0)