canceraiddev/elm-dialog/2.0.0

Dialog

Simple Dialog.

We recommend checking out the examples to get a feel for how it works.

Configuration

type Config msg

Opaque type representing dialog config

config : msg -> Config msg

Create an initial dialog config. You can specify the title, body, footer and other option functions.

closeOnBackgroundClick : Bool -> Config msg -> Config msg
showCloseIcon : Bool -> Config msg -> Config msg

Colors

dark : Config msg -> Config msg

Option to apply is-dark color to dialog

primary : Config msg -> Config msg

Option to apply is-primary color to dialog

info : Config msg -> Config msg

Option to apply is-info color to dialog

success : Config msg -> Config msg

Option to apply is-success color to dialog

warning : Config msg -> Config msg

Option to apply is-warning color to dialog

danger : Config msg -> Config msg

Option to apply is-danger color to dialog

Content

title : String -> Config msg -> Config msg

Option to set title string of dialog

body : List (Attribute msg) -> List (Html msg) -> Config msg -> Config msg

Option to set body content of dialog

Sizes

small : Config msg -> Config msg

Option to apply is-small to dialog

medium : Config msg -> Config msg

Option to apply is-medium to dialog

large : Config msg -> Config msg

Option to apply is-large to dialog

View

view : Config msg -> Html msg

View dialog for specified config

viewLoading : Html msg

View loading dialog. Styled using bulma progress bar

viewCustomLoading : List (Attribute msg) -> List (Html msg) -> Html msg

View loading dialog with custom element.