mc706/prefab-ui/5.1.0

Prefab.Alert

A simple alert component that can be used to display messages to the user.

See clarity.design alerts

Creating

new : { message : String } -> Alert msg

Create a new alert with the given message and default settings

view : List (Attribute msg) -> Alert msg -> Element msg

Display the alert

Modifying

withDismiss : msg -> Alert msg -> Alert msg

Set a dismiss button with the given message

withSize : AlertSize -> Alert msg -> Alert msg

Set the size of the alert

withType : AlertType -> Alert msg -> Alert msg

Set the type of alert

Types

= Normal
| Compact

The size of the alert to display

= Success
| Info
| Warning
| Danger

The type of alert to display