mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-11 03:28:09 +03:00
Fix checkbox (#175)
* Update src/Nri/Ui/Checkbox/V3.elm * port to 0.18 as well
This commit is contained in:
parent
82873bef78
commit
3d80d512c6
@ -248,6 +248,12 @@ viewCheckbox :
|
||||
}
|
||||
-> Html.Html msg
|
||||
viewCheckbox model config =
|
||||
let
|
||||
toggledValue =
|
||||
selectedToMaybe model.selected
|
||||
|> Maybe.withDefault False
|
||||
|> not
|
||||
in
|
||||
Html.Styled.span
|
||||
[ css
|
||||
[ display block
|
||||
@ -266,7 +272,7 @@ viewCheckbox model config =
|
||||
[ Html.checkbox model.identifier
|
||||
(selectedToMaybe model.selected)
|
||||
[ Widget.label model.label
|
||||
, Events.onCheck model.setterMsg
|
||||
, Events.onClick (model.setterMsg toggledValue)
|
||||
, Attributes.id model.identifier
|
||||
, Attributes.disabled model.disabled
|
||||
]
|
||||
|
@ -248,6 +248,12 @@ viewCheckbox :
|
||||
}
|
||||
-> Html.Html msg
|
||||
viewCheckbox model config =
|
||||
let
|
||||
toggledValue =
|
||||
selectedToMaybe model.selected
|
||||
|> Maybe.withDefault False
|
||||
|> not
|
||||
in
|
||||
Html.Styled.span
|
||||
[ css
|
||||
[ display block
|
||||
@ -265,7 +271,7 @@ viewCheckbox model config =
|
||||
[ Html.checkbox model.identifier
|
||||
(selectedToMaybe model.selected)
|
||||
[ Widget.label model.label
|
||||
, Events.onCheck model.setterMsg
|
||||
, Events.onClick (model.setterMsg toggledValue)
|
||||
, Attributes.id model.identifier
|
||||
, Attributes.disabled model.disabled
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user