{# @description A dialog: daisyUI's modal box with a body and an optional actions row. Give title or aria-label so it has a name. To preview it open, set id to demo_modal and switch open on. #} {# @prop id:text | required | description:"Dialog id, used by a trigger to open it (showModal()) and close it (close()). Also names the dialog's heading when title is set." #} {# @prop title:text | description:"Heading shown in the box, and the dialog's accessible name when id is set. Give this or aria-label." #} {# @prop placement:select['top','middle','bottom','start','end'] | description:"Where the dialog sits on screen. Leave empty to centre it." #} {# @prop closable:boolean | description:"Show a close button in the top corner that closes the dialog without script." #} {# @prop open:boolean | description:"Render the dialog already shown (). This is not modal: Escape does not close it and focus is not trapped, though the backdrop still does. A trigger cannot open a dialog that is already shown this way. A project that needs a modal dialog shown on load calls showModal() itself." #} {# @prop content_class:text | description:"Extra classes added to the modal box." #} {# @prop actions:text | description:"Buttons shown in daisyUI's trailing actions row. Given as the actions slot." #} {# @prop class:text | description:"Extra classes added to the dialog." #} {# @slot Delete this item? This can't be undone. — The dialog body, shown in the box. #} {# @slot:actions
Cancel
— Buttons shown in daisyUI's trailing actions row. #} {# @trigger Open — a modal starts closed; any element opens it by calling showModal() on the dialog whose id matches the modal's id prop, and close() or a form with method="dialog" closes it. #} {% load i18n daisy_cotton %}