Skip to content

Commit 71a2340

Browse files
authored
feat: card component title action (#1596)
1 parent 9b5e9ec commit 71a2340

File tree

1 file changed

+12
-3
lines changed
  • src/unfold/templates/unfold/components

1 file changed

+12
-3
lines changed

src/unfold/templates/unfold/components/card.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<{% if href %}a href="{{ href }}"{% else %}div{% endif %} class="bg-white block flex flex-col grow overflow-hidden p-6 relative rounded-default shadow-xs dark:bg-base-900 dark:border-base-800 {% if not disable_border %}border border-base-200 {% else %}shadow-base-500/20{% endif %} {% if href %}cursor-pointer transition-all hover:border-base-300 hover:shadow-md dark:hover:border-base-700 dark:hover:shadow-base-800/50 {% endif %}{% if class %} {{ class }}{% endif %}">
2+
23
{% if title %}
3-
<h2 class="border-b border-base-200 font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 text-[15px] text-font-important-light dark:text-font-important-dark dark:border-base-800">
4-
{{ title }}
5-
</h2>
4+
<div class="border-b border-base-200 flex flex-row items-center mb-6 -mt-6 -mx-6 py-4 px-6 dark:border-base-800">
5+
<h2 class="font-semibold text-[15px] text-important">
6+
{{ title }}
7+
</h2>
8+
9+
{% if action %}
10+
<div class="ml-auto">
11+
{{ action }}
12+
</div>
13+
{% endif %}
14+
</div>
615
{% endif %}
716

817
<div class="grow relative{% if icon %} pl-8{% endif %}">

0 commit comments

Comments
 (0)