lenards/elm-ui-patternfly/4.0.1

NOTE: the latest version is 4.0.2

PF6.Modal

PF6 Modal component

Modals present information in an overlay above the main page content.

See: https://www.patternfly.org/components/modal

Definition

type Size

Modal width size

Constructor

Content modifiers

withTitle : String -> Modal msg -> Modal msg

Set the modal title

withDescription : String -> Modal msg -> Modal msg

Set a description below the title

withBody : Element msg -> Modal msg -> Modal msg

Set the modal body content

withFooter : Element msg -> Modal msg -> Modal msg

Set the modal footer (usually action buttons)

Size modifiers

Small modal (~400px)

Medium modal (~600px, default)

Large modal (~900px)

withVariantSize : Int -> Modal msg -> Modal msg

Custom width in pixels

Close behavior

withCloseMsg : msg -> Modal msg -> Modal msg

Set the message sent when the close button or backdrop is clicked

withNoClose : Modal msg -> Modal msg

Hide the close button

Rendering

toMarkup : Theme -> Modal msg -> Element msg

Render the Modal as an Element msg

The modal renders as a full-viewport overlay with a centered dialog box. Wrap your application in a Element.inFront (Modal.toMarkup myModal) pattern.