bluedogtraining/bdt-elm/8.1.0

NOTE: this package is not compatible with Elm 0.19.1

Button

Module to add Buttons to your app

Type hint

type Button msg

Type hint buttons

type alias model =
    { headerTitle : String
    , headerButtons : List (Button Msg)
    }

Initialise

view : Button msg

Init a button

viewIf : Bool -> Button msg

Init a button if True

Configure

text : String -> Button msg -> Button msg

Set the text

icon : Icon -> Button msg -> Button msg

Set an icon

onClick : msg -> Button msg -> Button msg

Fire a Msg when clicked

small : Button msg -> Button msg

Make the button small

isLoading : Bool -> Button msg -> Button msg

Display as loading, removing the click Msg

isDisabled : Bool -> Button msg -> Button msg

Display as disabled, removing the click Msg

green : Button msg -> Button msg

Style it green

red : Button msg -> Button msg

Style it red

Render

render : Button msg -> Html msg

Render the button