Represent the component State.
Represents the messages dispatched by the ListChooser Component
Represent a single item which can be selected via ListChooser's API.
Defines the mode in which the list must be shown. It's possible to choose
between the full list of items (viewModeAll) or a limited set of items (viewModePartial).
In this case the number of items to be shown is expressed via shownItems.
Create the configuration of the ListChooser.
...
myConfig : ListChooser.Config
myConfig =
let
shownItems =
5
viewAllLabel =
"Show all"
viewPartialLabel =
"Show first " ++ (String.fromInt shownItems) ++ " elements"
in
ListChooser.config shownItems viewAllLabel viewPartialLabel
...Creates a representation of a ChooserItem.
...
myItem : ListChooser.ChooserItem
myItem =
let
slug =
"my_item_slug"
content =
"Lorem ipsum dolor sit amet."
isSelected =
False
in
ListChooser.createItem (slug, content, isSelected)
...Adds a generic Html.Attribute to the ListChooser.
Adds items to the ListChooser instance State record.
Adds a class for every item into the Config.
Adds an id Html.Attribute to the ListChooser.
Adds a class for the selected items to the Config.
Adds a class for the wrapper to the Config.
Represent the configuration of the component.