lenards/elm-ui-patternfly/2.1.0

NOTE: the latest version is 4.0.2

PF6.Alert

PF6 Alert component

Alerts communicate status and provide brief, contextual information to users.

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

Definition

type Alert msg

Opaque Alert type

type Variant

Alert severity variants

Constructor

alert : String -> Alert msg

Construct a default Alert with the given body text

Variant modifiers

withSuccess : Alert msg -> Alert msg

Success variant (green)

withDanger : Alert msg -> Alert msg

Danger variant (red)

withWarning : Alert msg -> Alert msg

Warning variant (yellow)

withInfo : Alert msg -> Alert msg

Info variant (purple)

withCustom : Alert msg -> Alert msg

Custom variant (teal)

Display modifiers

withTitle : String -> Alert msg -> Alert msg

Set the alert title

withInline : Alert msg -> Alert msg

Inline display — no outer box shadow, fits within content

withPlain : Alert msg -> Alert msg

Plain display — no background color

Action modifiers

withCloseMsg : msg -> Alert msg -> Alert msg

Add a close button that sends msg on click

withActions : Element msg -> Alert msg -> Alert msg

Add action buttons below the alert body

Rendering

toMarkup : Alert msg -> Element msg

Render the Alert as an Element msg