orus-io/elm-orus-ui/1.0.0

NOTE: the latest version is 1.0.1

Formerly cdevienne/elm-orus-ui. Search finds this package by either name.

OUI.Dialog

Dialogs provide important prompts in a user flow

Constructors

type Dialog msg

A dialog

type Width
= Small
| Medium
| Large
| AutoWidth
| Fullscreen

Dialog width

new : String -> Dialog msg

Creates a new dialog with a single headline and a dismiss action

withIcon : Icon -> Dialog msg -> Dialog msg

add a hero icon

withSupportingText : String -> Dialog msg -> Dialog msg

add a supporting text

withWidth : Width -> Dialog msg -> Dialog msg

set a width

onDismiss : String -> msg -> Dialog msg -> Dialog msg

add a 'dismiss' action

onAccept : String -> msg -> Dialog msg -> Dialog msg

add a 'accept' action

Getters

getHeadline : Dialog msg -> String

get the headline

getIcon : Dialog msg -> Maybe Icon

get the icon

getSupportingText : Dialog msg -> Maybe String

get the supporting text

get the width

getAccept : Dialog msg -> Maybe ( String, msg )

get the 'accept' action

getDismiss : Dialog msg -> Maybe ( String, msg )

get the 'dismiss' action