Files
myep-team/templates/components/menu.html.twig
T

14 lines
769 B
Twig

{#-
A "⋯" menu (menu_controller.js), opened by click or tap, never by hover. The items go in the
content block: links or buttons with the class `menu-item` (or `menu-item-danger`) and
role="menuitem". Choosing one closes the menu.
-#}
{% set label = label ?? 'Aktionen' %}
<div class="relative inline-block" {{ stimulus_controller('menu') }}>
<button type="button" class="btn-more" aria-haspopup="menu" aria-expanded="false" aria-label="{{ label }}"
{{ stimulus_target('menu', 'button') }} {{ stimulus_action('menu', 'toggle') }}>⋯</button>
<div class="menu-panel" role="menu" hidden {{ stimulus_target('menu', 'panel') }} {{ stimulus_action('menu', 'choose', 'click') }}>
{% block content %}{% endblock %}
</div>
</div>