Files
shoppy/web/templates/components/generic/toast.html
T
2025-01-23 14:30:02 +01:00

27 lines
1.3 KiB
HTML

<div id="toast-default"
class="flex items-center w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800"
role="alert"
>
<div class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:bg-blue-800 dark:text-blue-200">
{% block icon %}
{% endblock %}
</div>
<div class="ms-3 text-sm font-normal">
{% block toast_text %}{% endblock %}
</div>
<button type="button"
class="ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2
focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8
dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer"
data-dismiss-target="#toast-default" aria-label="Close"
hx-on:click="htmx.toggleClass(htmx.find('#toast-default'), 'hidden')"
>
<span class="sr-only">{% translate 'Cerrar' %}</span>
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
</svg>
</button>
</div>