Module
SDOM.Components
- Package
- purescript-sdom
- Repository
- paf31/purescript-sdom
#checkbox Source
checkbox :: forall context channel model. (context -> model -> String) -> (model -> Boolean) -> (model -> Boolean -> model) -> SDOM channel context model model
Render a checkbox and an accompanying label
inside a span
.
The first argument chooses a unique name for the input component so that it can be connected to the label.
The second and third arguments encapsulate the checked
status of the
checkbox as a getter/setter pair.
#select Source
select :: forall context channel option. (option -> { key :: String, label :: String }) -> (String -> option) -> Array option -> SDOM channel context option option
Render a select component.
The first and second arguments encapsulate the selected option as a getter/setter pair on the model type.
The third argument converts an option to a unique key and a rendered label.
The fourth argument converts a key back into an option.
The fifth argument is an array of all available options.