A modal that asks before something that cannot be taken back, such as publishing a review to GitHub.
The LiveView decides when it is there (:if={@confirming}); it takes the focus in, keeps it inside
(Phoenix.Component.focus_wrap/1), closes with Esc or the close button, and gives the focus back to
what opened it. The two buttons are the caller's, so the confirming one can say what it does
("Publish", not "OK").
Summary
Functions
Attributes
id(:string) (required)title(:string) (required)eyebrow(:string) - a small mono line above the title. Defaults tonil.on_cancel(:any) (required) - an event name or aJScommand, run on Esc, the close button and the backdrop.close_label(:string) (required)class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
close_icon(required)inner_block(required) - what will happen, in a sentence or two.actions(required) - the cancel and the confirm buttons.