Skip to content

Commit 6e9032f

Browse files
authored
feat: cohort component subtitle (#892)
1 parent f6c9fc0 commit 6e9032f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/unfold/templates/unfold/components/chart/cohort.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
{% for col in row.cols %}
4141
<td class="h-full">
4242
<div class="flex flex-col h-full justify-center px-3 py-2.5 rounded-md {% if col.color %}{{ col.color }}{% else %}bg-gray-50 border border-dashed dark:bg-gray-800 dark:border-gray-700{% endif %}">
43-
{{ col.value }}
43+
<span>
44+
{{ col.value }}
45+
</span>
46+
47+
{% if col.subtitle %}
48+
<span class="mt-0.5">
49+
{{ col.subtitle }}
50+
</span>
51+
{% endif %}
4452
</div>
4553
</td>
4654
{% endfor %}

src/unfold/templates/unfold/components/navigation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if items %}
2-
<nav class="bg-gray-100 flex gap-2 mb-8 p-1 rounded text-sm dark:bg-white/[.04]{% if class %} {{ class }}{% endif %}">
2+
<nav class="bg-gray-100 flex gap-2 p-1 rounded text-sm dark:bg-white/[.04]{% if class %} {{ class }}{% endif %}">
33
{% for item in items %}
44
<a href="{{ item.link }}" class="flex flex-row font-medium items-center px-2.5 py-1 rounded {% if item.active %} bg-white shadow-sm text-font-important-light hover:bg-white dark:bg-gray-900 dark:hover:bg-gray-900 dark:text-font-important-dark{% else %}text-font-subtle-light dark:text-font-subtle-dark hover:bg-gray-700/[.04] dark:hover:bg-white/[.04]{% endif %}">
55
{% if item.icon %}

0 commit comments

Comments
 (0)