orus-io/elm-orus-ui/1.0.1

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

OUI.Switch

A Switch component

type Switch msg

A Switch component

new : Bool -> Switch msg

create a new unselected Switch

Set the icon to use when selected

Set the icon to use when unselected

withColor : Color -> Switch msg -> Switch msg

Change the primary color

onChange : (Bool -> msg) -> Switch msg0 -> Switch msg

Set the event handler

get the color

getIconSelected : Switch msg -> Maybe Icon

get the icon when selected

get the icon when unselected

getOnChange : Switch msg -> Maybe (Bool -> msg)

get the 'on change' message builder

getSelected : Switch msg -> Bool

get the selected state