The primary color scheme applied to the alert background.
Alert.primary "Proceed to login..."The UI.Alert is a component for displaying feedback in a full-width banner.
It can have different background colors depending on the type of feedback.
An alert can be created and render as in the following pipeline:
Element.column []
[ Alert.danger "Failed to login."
|> Alert.renderElement renderConfig
, -- The rest of the screen (...)
]The primary color scheme applied to the alert background.
Alert.primary "Proceed to login..."The success color scheme applied to the alert background.
Alert.success "Category created with success."The warning color scheme applied to the alert background.
Alert.warning "Proceed with caution!"The danger color scheme applied to the alert background.
Alert.danger "Failed to apply changes!"Displays an icon in the right side of the alert, depending on its color scheme.
- Primary: Won't show any icon;
- Success: Shows [UI.Icon.check](UI-Icon#check);
- Warning: Will show a loading spinner;
- Danger: Shows [UI.Icon.warning](UI-Icon#warning).Inline style makes the alert's corners rounded
End of the builder's life. The result of this function is a ready-to-insert Elm UI's Element.
The
Alert msgtype is used for describing the component for later rendering.