mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-18 11:11:38 +03:00
Pass through the checkbox icon in
This commit is contained in:
parent
20f5afb0ec
commit
d72aaca767
@ -105,20 +105,31 @@ buildCheckbox assets modifierClasses model labelContent =
|
|||||||
case model.theme of
|
case model.theme of
|
||||||
Square ->
|
Square ->
|
||||||
{ containerClasses = toClassList (modifierClasses ++ [ "SquareClass" ])
|
{ containerClasses = toClassList (modifierClasses ++ [ "SquareClass" ])
|
||||||
, labelStyles = squareLabelStyles assets model
|
, labelStyles =
|
||||||
|
squareLabelStyles model <|
|
||||||
|
case model.selected of
|
||||||
|
Selected ->
|
||||||
|
assets.checkboxChecked_svg
|
||||||
|
|
||||||
|
NotSelected ->
|
||||||
|
assets.checkboxUnchecked_svg
|
||||||
|
|
||||||
|
PartiallySelected ->
|
||||||
|
assets.checkboxCheckedPartially_svg
|
||||||
, labelClasses = labelClass model.selected
|
, labelClasses = labelClass model.selected
|
||||||
, labelContent = labelContent
|
, labelContent = labelContent
|
||||||
}
|
}
|
||||||
|
|
||||||
LockOnInside ->
|
LockOnInside ->
|
||||||
{ containerClasses = toClassList (modifierClasses ++ [ "LockOnInsideClass" ])
|
{ containerClasses = toClassList (modifierClasses ++ [ "LockOnInsideClass" ])
|
||||||
, labelStyles = lockLabelStyles assets.checkboxLockOnInside_svg model
|
, labelStyles = lockLabelStyles model assets.checkboxLockOnInside_svg
|
||||||
, labelClasses = labelClass model.selected
|
, labelClasses = labelClass model.selected
|
||||||
, labelContent = labelContent
|
, labelContent = labelContent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
squareLabelStyles assets model =
|
squareLabelStyles : { b | disabled : Bool } -> Asset -> Html.Styled.Attribute msg
|
||||||
|
squareLabelStyles model image =
|
||||||
let
|
let
|
||||||
baseStyles =
|
baseStyles =
|
||||||
[ -- Postioning
|
[ -- Postioning
|
||||||
@ -137,15 +148,7 @@ squareLabelStyles assets model =
|
|||||||
-- Icon
|
-- Icon
|
||||||
, backgroundRepeat noRepeat
|
, backgroundRepeat noRepeat
|
||||||
, property "background-position" "left center"
|
, property "background-position" "left center"
|
||||||
, case model.selected of
|
, backgroundImage image
|
||||||
Selected ->
|
|
||||||
backgroundImage assets.checkboxChecked_svg
|
|
||||||
|
|
||||||
NotSelected ->
|
|
||||||
backgroundImage assets.checkboxUnchecked_svg
|
|
||||||
|
|
||||||
PartiallySelected ->
|
|
||||||
backgroundImage assets.checkboxCheckedPartially_svg
|
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
css
|
css
|
||||||
@ -156,7 +159,8 @@ squareLabelStyles assets model =
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
lockLabelStyles image model =
|
lockLabelStyles : { b | disabled : Bool } -> Asset -> Html.Styled.Attribute msg
|
||||||
|
lockLabelStyles model image =
|
||||||
let
|
let
|
||||||
baseStyles =
|
baseStyles =
|
||||||
[ -- Positioning
|
[ -- Positioning
|
||||||
|
Loading…
Reference in New Issue
Block a user