feat: speedbump before deleting downloads
This commit is contained in:
26
templates/components/Modal.html.twig
Normal file
26
templates/components/Modal.html.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
<div{{ attributes }} data-controller="dialog" data-action="click->dialog#backdropClose">
|
||||
<dialog data-dialog-target="dialog" class="py-3 px-4 w-[30rem] rounded-md">
|
||||
<h2 class="mb-4 text-2xl font-bold">{{ heading }}</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% if show_cancel is defined or show_submit is defined %}
|
||||
<div class="flex justify-end">
|
||||
{% if show_cancel is defined %}
|
||||
<button type="button" data-action="dialog#close" class="px-1 py-1 rounded-md self-end w-16" autofocus>
|
||||
{{ cancel_text|default('Cancel') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if show_submit is defined %}
|
||||
<button type="button" {{ submit_action|raw }} class="px-1 py-1 rounded-md bg-orange-500 self-end text-white w-16 ml-2" autofocus>
|
||||
{{ submit_text|default('Submit') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</dialog>
|
||||
|
||||
<button type="button" data-action="dialog#open">{{ button_text|raw }}</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user