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
|
||||
css
|
||||
(if model.disabled then
|
||||
[ cursor auto, opacity (num 0.4) ] ++ baseStyles
|
||||
else
|
||||
[ cursor pointer ] ++ baseStyles
|
||||
(baseStyles
|
||||
++ (if model.disabled then
|
||||
[ cursor auto, checkboxImageSelector [ opacity (num 0.4) ] ]
|
||||
else
|
||||
[ cursor pointer ]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@ -156,10 +158,14 @@ lockLabelStyles model image =
|
||||
]
|
||||
in
|
||||
css
|
||||
(if model.disabled then
|
||||
[ cursor auto, opacity (num 0.4) ] ++ baseStyles
|
||||
else
|
||||
[ cursor pointer ] ++ baseStyles
|
||||
(baseStyles
|
||||
++ (if model.disabled then
|
||||
[ cursor auto
|
||||
, checkboxImageSelector [ opacity (num 0.4) ]
|
||||
]
|
||||
else
|
||||
[ cursor pointer ]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@ -183,7 +189,7 @@ addIcon : Asset -> Style
|
||||
addIcon icon =
|
||||
batch
|
||||
[ position relative
|
||||
, before
|
||||
, checkboxImageSelector
|
||||
[ backgroundImage icon
|
||||
, backgroundRepeat noRepeat
|
||||
, backgroundSize (px 24)
|
||||
@ -197,6 +203,11 @@ addIcon icon =
|
||||
]
|
||||
|
||||
|
||||
checkboxImageSelector : List Style -> Style
|
||||
checkboxImageSelector =
|
||||
before
|
||||
|
||||
|
||||
labelClass : IsSelected -> Html.Styled.Attribute msg
|
||||
labelClass isSelected =
|
||||
case isSelected of
|
||||
|
Loading…
Reference in New Issue
Block a user