Added:
- AdditionnalData for buttons - refresh manga metadata and chapters
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
{# templates/components/ToolbarButton.html.twig #}
|
||||
{% set buttonAttributes = {} %}
|
||||
|
||||
{% if data is defined and data is not empty %}
|
||||
{% for key, value in data %}
|
||||
{% set dataAttribute = 'data-' ~ key|replace({'_': '-'})|lower ~ '=' ~ value %}
|
||||
{% set buttonAttributes = buttonAttributes|merge({dataAttribute}) %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div {{ attributes }}>
|
||||
<button
|
||||
class="flex flex-col justify-around min-h-14 w-min ml-4 items-center text-white group"
|
||||
<button class="flex flex-col justify-around min-h-14 w-min ml-4 items-center text-white group"
|
||||
{% if action %}
|
||||
{{ stimulus_action(controller|default('toolbar'), action) }}
|
||||
{{ stimulus_action('toolbar', action) }}
|
||||
{% endif %}
|
||||
{{ buttonAttributes|join(' ') }}
|
||||
>
|
||||
<i class="fas fa-{{ icon }} text-xl group-hover:text-green-500"></i>
|
||||
<span class="text-xs">{{ text }}</span>
|
||||
|
||||
Reference in New Issue
Block a user