Skip to content

Commit b22ac5a

Browse files
committed
Merge branch 'release/v1.2.1'
2 parents 972916b + d33a8b3 commit b22ac5a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/Resources/assets/styles/_tailwind.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
// Badges
8484
.whatwedo-utility-badge {
8585
@apply inline-flex items-center rounded-full px-2 py-1 text-xs font-medium bg-primary-500 text-white;
86+
text-wrap: nowrap;
8687

8788
&--success {
8889
@apply bg-success-500;
@@ -105,6 +106,19 @@
105106
}
106107
}
107108

109+
.whatwedo-utility-button-badge {
110+
@apply inline-flex items-center rounded-full px-2 py-0.5 ml-2 text-xs font-medium bg-primary-500 text-white;
111+
text-wrap: nowrap;
112+
113+
&--primary {
114+
@apply bg-primary-500 text-white;
115+
}
116+
117+
&--white {
118+
@apply bg-white text-primary-500;
119+
}
120+
}
121+
108122
// Topbar
109123
.whatwedo-utility-topbar {
110124
@apply flex flex-grow-0 flex-auto px-4 py-2 md:py-4 md:min-h-[71px] justify-end items-center lg:justify-between;
@@ -212,6 +226,10 @@
212226
@apply text-neutral-700 bg-transparent hover:bg-neutral-200 font-semibold;
213227
}
214228
}
229+
230+
.whatwedo-utility-button-badge--white {
231+
@extend .whatwedo-utility-button-badge--primary;
232+
}
215233
}
216234

217235
/* TomSelect */

src/Resources/views/includes/_action.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@
6565
class: 'inline h-4 w-4'~(not actionLabel is empty ? ' mr-2' : '')
6666
}) }}
6767
{% endif %}
68-
<span class="2xl:block">{{ actionLabel }}</span>
68+
<span class="2xl:block">
69+
{{ actionLabel }}
70+
{% if action.option('attr')['count'] is defined %}
71+
<span class="whatwedo-utility-button-badge whatwedo-utility-button-badge--white">{{ action.option('attr')['count'] }}</span>
72+
{% endif %}
73+
</span>
6974
</a>
7075
{% endif %}
7176
{% endblock %}

0 commit comments

Comments
 (0)