18 lines
512 B
Twig
18 lines
512 B
Twig
{% set warning = warning ?? false %}
|
|
{% set method = method ?? 'get' %}
|
|
<button type="button"
|
|
class="{{ warning ? 'menu-item-danger' : 'menu-item' }}"
|
|
role="menuitem"
|
|
{{ stimulus_action('menu', 'choose') }}
|
|
{{ attributes
|
|
.defaults({
|
|
'hx-target': 'body',
|
|
'hx-swap': 'beforeend',
|
|
})
|
|
.without('url', 'warning', 'method')
|
|
}}
|
|
hx-{{ method | lower }}="{{ url }}"
|
|
>
|
|
{{ block('content') }}
|
|
</button>
|