mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-18 19:21:29 +03:00
Opacify just the checkbox image and not the whole line
This commit is contained in:
parent
84a26bff31
commit
abef87447e
@ -138,10 +138,12 @@ squareLabelStyles model image =
|
|||||||
]
|
]
|
||||||
in
|
in
|
||||||
css
|
css
|
||||||
(if model.disabled then
|
(baseStyles
|
||||||
[ cursor auto, opacity (num 0.4) ] ++ baseStyles
|
++ (if model.disabled then
|
||||||
else
|
[ cursor auto, checkboxImageSelector [ opacity (num 0.4) ] ]
|
||||||
[ cursor pointer ] ++ baseStyles
|
else
|
||||||
|
[ cursor pointer ]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -156,10 +158,14 @@ lockLabelStyles model image =
|
|||||||
]
|
]
|
||||||
in
|
in
|
||||||
css
|
css
|
||||||
(if model.disabled then
|
(baseStyles
|
||||||
[ cursor auto, opacity (num 0.4) ] ++ baseStyles
|
++ (if model.disabled then
|
||||||
else
|
[ cursor auto
|
||||||
[ cursor pointer ] ++ baseStyles
|
, checkboxImageSelector [ opacity (num 0.4) ]
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[ cursor pointer ]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -183,7 +189,7 @@ addIcon : Asset -> Style
|
|||||||
addIcon icon =
|
addIcon icon =
|
||||||
batch
|
batch
|
||||||
[ position relative
|
[ position relative
|
||||||
, before
|
, checkboxImageSelector
|
||||||
[ backgroundImage icon
|
[ backgroundImage icon
|
||||||
, backgroundRepeat noRepeat
|
, backgroundRepeat noRepeat
|
||||||
, backgroundSize (px 24)
|
, backgroundSize (px 24)
|
||||||
@ -197,6 +203,11 @@ addIcon icon =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
checkboxImageSelector : List Style -> Style
|
||||||
|
checkboxImageSelector =
|
||||||
|
before
|
||||||
|
|
||||||
|
|
||||||
labelClass : IsSelected -> Html.Styled.Attribute msg
|
labelClass : IsSelected -> Html.Styled.Attribute msg
|
||||||
labelClass isSelected =
|
labelClass isSelected =
|
||||||
case isSelected of
|
case isSelected of
|
||||||
|
Loading…
Reference in New Issue
Block a user