orus-io/elm-orus-ui/1.0.1

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

OUI.RadioButton

A Radiobutton creation API

type RadioButton constraints msg

A RadioButton component

Constructor

new :
{ needOnChangeOrDisabled : ()
, needSelected : ()
}
msg

creates a RadioButton. It must get a 'onChange' handler or be 'disabled'.

Basic properties

Change the RadioButton color

Bool
-> RadioButton { a | needSelected : () } msg
-> RadioButton { a | withSelected : () } msg

Set the 'selected' state. It not used, the RadioButton is 'undetermined'.

(Bool -> msg)
-> RadioButton { a | needOnChangeOrDisabled : () } msg
-> RadioButton { a | hasAction : () } msg

Set a change handler msg

RadioButton { a | needOnChangeOrDisabled : () } msg
-> RadioButton { a | hasAction : () } msg

disable the RadioButton

Internals

get the color

getOnChange : RadioButton c msg -> Maybe (Bool -> msg)

get the 'onChange' message

getSelected : RadioButton c msg -> Bool

get the 'selected' value