A dialog for a decision that interrupts: confirm, tell that something worked, fill a short form. To edit
without losing the context use DevactionUI.Drawer; to ask before something that cannot be undone use
danger_dialog/1.
The LiveView decides when it is there (:if={@open}). It takes the focus in, keeps it inside, closes with Esc
and, unless it is dismissible={false}, with a click outside; the focus goes back to the button that opened it
when that button used DevactionUI.Drawer.open/1. Sizes: :sm 400, :md 520 (default), :lg 720.
Summary
Functions
Attributes
id(:string) (required)size(:atom) - Defaults to:md. Must be one of:sm,:md, or:lg.tone(:atom) - the tone of the icon tile. Defaults to:neutral. Must be one of:neutral,:info,:ok,:warn, or:risk.centered(:boolean) - the icon, the title and the text in the middle, for a success. Defaults tofalse.dismissible(:boolean) - a click outside closes it. Defaults totrue.on_close(:any) (required) - an event name or aJScommand, run on Esc, the close button and a click outside.close_label(:string) - when given, a close button is drawn in the corner. Defaults tonil.focus(:string) - a selector of what takes the focus when it opens; the first control when left out. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
icon- the mark in the tile before the title.close_icontitle(required)subtitleinner_block- the body, between the header and the footer.footer- the actions, at the end.