1
1
mirror of https://github.com/NoRedInk/noredink-ui.git synced 2024-12-24 14:13:20 +03:00

add doc messages

This commit is contained in:
Alex Perkins 2021-11-19 08:58:22 -05:00
parent f4d74032d4
commit 598daf604f

View File

@ -82,13 +82,16 @@ selectedValue value_ =
Attribute { emptyEventsAndValues | selectedValue = value_ } identity
{-| What message
{-| Fire a message parameterized by the value type when selecting a radio option
-}
onSelect : (value -> msg) -> Attribute value msg
onSelect onSelect_ =
Attribute { emptyEventsAndValues | onSelect = Just onSelect_ } identity
{-| Since <input>s transact in strings we need to be able to give every radio button in a group
a unique string value. This function should be the same for every RadioButton in a group.
-}
valueToString : (value -> String) -> Attribute value msg
valueToString valueToString_ =
Attribute { emptyEventsAndValues | valueToString = Just valueToString_ } identity