Hide side_panel_button if empty (#8492)

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
pull/8549/head
Steve Stein 2022-05-06 08:48:55 -06:00 zatwierdzone przez Thibaud Colas
rodzic 293226f8a1
commit a4b5819ac5
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -8,9 +8,11 @@
has_toggle - Show toggle icon on the button
attr - custom attributes for the button
{% endcomment %}
<button type="button" class="{{ classes }} w-bg-transparent w-text-14 w-p-0 w-text-teal-200 hover:w-text-teal-600 w-inline-flex w-justify-center w-transition" {% if data_url %}data-url="{{ data_url }}" {% endif %}{% if has_toggle %}data-button-with-dropdown-toggle {% endif %}{{ attr }}>
{{ text }}
{% if has_toggle %}
{% icon name='arrow-down' class_name='w-w-4 w-h-4 w-transition motion-reduce:w-transition-none' %}
{% endif %}
</button>
{% if text %}
<button type="button" class="{{ classes }} w-bg-transparent w-text-14 w-p-0 w-text-teal-200 hover:w-text-teal-600 w-inline-flex w-justify-center w-transition" {% if data_url %}data-url="{{ data_url }}" {% endif %}{% if has_toggle %}data-button-with-dropdown-toggle {% endif %}{{ attr }}>
{{ text }}
{% if has_toggle %}
{% icon name='arrow-down' class_name='w-w-4 w-h-4 w-transition motion-reduce:w-transition-none' %}
{% endif %}
</button>
{% endif %}