rakutentech/r10/6.2.0

NOTE: the latest version is 7.0.0

R10.Button

Buttons!

Buttons

List (Attribute (ContextInternal z) msg)
-> { label : Element (ContextInternal z) msg
, libu : Type msg
, translation : { a | key : String }
}
-> Element (ContextInternal z) msg

Primary Button for Call to Actions

R10.Button.primary []
    { label = text "Text"
    , libu = R10.Libu.Bu <| Just doSomething
    , theme =
        { mode = R10.Mode.Light
        , primaryColor = R10.Color.Primary.CrimsonRed
        }
    }
List (Attribute (ContextInternal z) msg)
-> { label : Element (ContextInternal z) msg
, libu : Type msg
, translation : { a | key : String }
}
-> Element (ContextInternal z) msg

Secondary Button

List (Attribute (ContextInternal z) msg)
-> { label : Element (ContextInternal z) msg
, libu : Type msg
, translation : { a | key : String }
}
-> Element (ContextInternal z) msg

Tertiary Button

List (Attribute (ContextInternal z) msg)
-> { label : Element (ContextInternal z) msg
, libu : Type msg
, translation : { a | key : String }
}
-> Element (ContextInternal z) msg

Quaternary Button

Others

type alias Data z msg =
{ label : Element (ContextInternal z) msg
, libu : Type msg
}

Type of data required by buttons

cssButtonStyle : Theme -> String

Special case for CSS buttons, useful if a button must be built using the standard Html library instead of elm-ui.

Default padding value for buttons

withLimitedWidth : List (Attribute (ContextInternal z) msg)

Attributes for buttons with limited width. By default buttons are width fill.

String
-> Element (ContextInternal z) msg
-> Element (ContextInternal z) msg