<c-vars w max_w close_button title/>
<dialog class="modal modal-bottom sm:modal-middle" {{ attrs }} >
    <div class="modal-box{% if w %} w-{{ w }}{% endif %}{% if max_w %} max-w-{{ max_w }}{% endif %}">
        {% if close_button %}
            <form method="dialog">
                <button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
            </form>
        {% endif %}
        {% if title %}
            <h3 class="text-lg font-bold">{{ title }}</h3>
        {% endif %}
        {{ slot }}
    </div>
</dialog>