mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 19:51:37 +03:00
required label attribute at the begininning, in keeping with other APIs
This commit is contained in:
parent
83486fbf2f
commit
710576115b
@ -120,8 +120,7 @@ emptyEventsAndValues =
|
||||
{-| This is private. The public API only exposes `Attribute`.
|
||||
-}
|
||||
type alias Config =
|
||||
{ label : Maybe String
|
||||
, name : Maybe String
|
||||
{ name : Maybe String
|
||||
, isLocked : Bool
|
||||
, isDisabled : Bool
|
||||
, showPennant : Bool
|
||||
@ -130,8 +129,7 @@ type alias Config =
|
||||
|
||||
emptyConfig : Config
|
||||
emptyConfig =
|
||||
{ label = Nothing
|
||||
, name = Nothing
|
||||
{ name = Nothing
|
||||
, isLocked = False
|
||||
, isDisabled = False
|
||||
, showPennant = False
|
||||
@ -173,13 +171,12 @@ applyEvents =
|
||||
If used in a group, all radio buttons in the group should have the same name attribute.
|
||||
-}
|
||||
view :
|
||||
{ label : String
|
||||
}
|
||||
String
|
||||
-> List (Attribute value msg)
|
||||
-> Html msg
|
||||
view config =
|
||||
view label =
|
||||
internalView
|
||||
{ label = config.label
|
||||
{ label = label
|
||||
, isLocked = False
|
||||
, premiumMsg = Nothing
|
||||
, showPennant = False
|
||||
|
@ -86,8 +86,7 @@ viewVanilla : State -> Html Msg
|
||||
viewVanilla state =
|
||||
div []
|
||||
[ RadioButton.view
|
||||
{ label = selectionToString Dogs
|
||||
}
|
||||
(selectionToString Dogs)
|
||||
[ RadioButton.enabled
|
||||
, RadioButton.value Dogs
|
||||
, RadioButton.name "pets"
|
||||
@ -96,8 +95,7 @@ viewVanilla state =
|
||||
, RadioButton.valueToString selectionToString
|
||||
]
|
||||
, RadioButton.view
|
||||
{ label = selectionToString Cats
|
||||
}
|
||||
(selectionToString Cats)
|
||||
[ RadioButton.enabled
|
||||
, RadioButton.value Cats
|
||||
, RadioButton.name "pets"
|
||||
@ -106,8 +104,7 @@ viewVanilla state =
|
||||
, RadioButton.valueToString selectionToString
|
||||
]
|
||||
, RadioButton.view
|
||||
{ label = selectionToString Robots
|
||||
}
|
||||
(selectionToString Robots)
|
||||
[ RadioButton.disabled
|
||||
, RadioButton.value Robots
|
||||
, RadioButton.name "pets"
|
||||
|
Loading…
Reference in New Issue
Block a user