{# Macro modal — dialog accesible via nativo Uso: {% from "core/components/modal.html" import modal_open %} {% call modal_open(id="my-modal", title="Título del modal") %}

Contenido del modal

{% endcall %} Depende de window.openModal/closeModal definidos en static/js/htmx-events.js. El elemento nativo provee focus trap e inert automático en el resto. #} {% macro modal_open(id, title, size="md") %} {%- set _max = "sm:max-w-md" if size == "sm" else ("sm:max-w-2xl" if size == "lg" else "sm:max-w-lg") -%} {%- endmacro %}