Fix checkbox indeterminate background
This commit is contained in:
@ -59,10 +59,10 @@ const StyledInput = styled.input<{
|
|||||||
& + label:before {
|
& + label:before {
|
||||||
--size: ${({ checkboxSize }) =>
|
--size: ${({ checkboxSize }) =>
|
||||||
checkboxSize === CheckboxSize.Large ? '18px' : '12px'};
|
checkboxSize === CheckboxSize.Large ? '18px' : '12px'};
|
||||||
background: ${({ theme, indeterminate }) =>
|
background: ${({ theme, indeterminate, isChecked }) =>
|
||||||
indeterminate ? theme.color.blue : 'transparent'};
|
indeterminate || isChecked ? theme.color.blue : 'transparent'};
|
||||||
border-color: ${({ theme, indeterminate, variant }) =>
|
border-color: ${({ theme, indeterminate, isChecked, variant }) =>
|
||||||
indeterminate
|
indeterminate || isChecked
|
||||||
? theme.color.blue
|
? theme.color.blue
|
||||||
: variant === CheckboxVariant.Primary
|
: variant === CheckboxVariant.Primary
|
||||||
? theme.border.color.inverted
|
? theme.border.color.inverted
|
||||||
@ -80,13 +80,6 @@ const StyledInput = styled.input<{
|
|||||||
width: var(--size);
|
width: var(--size);
|
||||||
}
|
}
|
||||||
|
|
||||||
& + label:before {
|
|
||||||
background: ${({ theme, isChecked }) =>
|
|
||||||
isChecked ? theme.color.blue : 'inherit'};
|
|
||||||
border-color: ${({ theme, isChecked }) =>
|
|
||||||
isChecked ? theme.color.blue : 'inherit'};
|
|
||||||
}
|
|
||||||
|
|
||||||
& + label > svg {
|
& + label > svg {
|
||||||
--padding: ${({ checkboxSize }) =>
|
--padding: ${({ checkboxSize }) =>
|
||||||
checkboxSize === CheckboxSize.Large ? '2px' : '1px'};
|
checkboxSize === CheckboxSize.Large ? '2px' : '1px'};
|
||||||
|
|||||||
Reference in New Issue
Block a user