gribouille/elm-bulma/1.0.1

NOTE: the latest version is 1.0.2

Modal

Modal component.

Types

type alias Button msg =
{ title : String
, trigger : msg
, enable : Bool
}

Modal button.

type alias Config msg =
{ title : String
, size : Size
, content : Html msg
, close : Button msg
, save : Maybe (Button msg)
}

Modal configuration. If save is nothing, the save button is hidden.

Example

{ title = "My Modal title"
, size = Medium
, content = div [] [...]
, close = Button "Close" OnClose True
, save = Just <| Button "Save" OnSave True
}
type alias Model =
Bool

Modal model (active or not).

type Size
= Small
| Medium
| Big

Modal size.

Functions

default : msg -> msg -> String -> Html msg -> Config msg

Default configuration for the modal view.

view : Config msg -> Model -> Html msg

Modal view.