The UI.V2.Dialog is a component for displaying dialogs and modals.
User must specify a title and an icon to be displayed in the title to construct it. Body and buttons can be specified optionally as in the following pipeline:
dialog "Title" Icon.warning closeMsg
|> withBody ("Body text" |> Text.body2 |> Text.renderElement cfg)
|> withButtons buttonsConstructs a dialog by receiving its title and an icon in the title.
With Dialog.withBody you can specify the body of the dialog.
Note: By default, the body is Element.none
With Dialog.withButtons you can specify the buttons for the footer of the
dialog.
Note: By default, the buttons are an empty list
The
Dialog msgtype is used for describing the component for later rendering.