Added:
- toolbar and fixes
This commit is contained in:
29
templates/components/DropdownMenu.html.twig
Normal file
29
templates/components/DropdownMenu.html.twig
Normal file
@@ -0,0 +1,29 @@
|
||||
{# templates/components/DropdownMenu.html.twig #}
|
||||
<div {{ attributes }} >
|
||||
<div data-controller="dropdown" class="relative inline-block">
|
||||
<twig:ToolBarButton
|
||||
icon="{{ icon }}"
|
||||
text="{{ text }}"
|
||||
action="toggle"
|
||||
data-dropdown-target="button"
|
||||
/>
|
||||
<div class="absolute left-0 mt-2 w-max z-10 bg-gray-800 rounded-sm shadow-lg hidden"
|
||||
data-dropdown-target="menu" data-controller="toolbar">
|
||||
<div class="py-1">
|
||||
{% for item in items %}
|
||||
<a href="#"
|
||||
class="block px-4 py-2 text-sm text-white hover:text-green-500"
|
||||
data-action="toolbar#{{ item.action }}"
|
||||
{% if item.data is defined %}
|
||||
{% for key, value in item.data %}
|
||||
data-{{ key }}="{{ value }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>
|
||||
{{ item.text }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user