Web: Components: checkbox: Fix displaying indeterminate color.

This commit is contained in:
TatianaLopaeva 2021-03-02 20:15:27 +03:00
parent bf7f680d08
commit ccc45a8d74
2 changed files with 15 additions and 11 deletions

View File

@ -71,9 +71,11 @@ const StyledLabel = styled.label`
}
rect:last-child {
fill: ${(props) =>
props.color === "#FFFF"
? props.theme.checkbox.indeterminateColor
: "white"};
props.color
? props.color === "#FFFF"
? props.theme.checkbox.indeterminateColor
: "white"
: props.theme.checkbox.indeterminateColor};
stroke: ${(props) =>
props.color === "#FFFF"
? props.theme.checkbox.fillColor
@ -118,7 +120,7 @@ const StyledLabel = styled.label`
? css`
cursor: not-allowed;
`
: !props.indeterminate
: !props.isIndeterminate
? css`
cursor: pointer;
@ -139,11 +141,13 @@ const StyledLabel = styled.label`
}
rect:last-child {
fill: ${(props) =>
props.indeterminate && props.color === "#FFFF"
? props.theme.checkbox.hoverIndeterminateColor
: props.indeterminate
? "white"
: props.color};
props.color
? props.isIndeterminate && props.color === "#FFFF"
? props.theme.checkbox.hoverIndeterminateColor
: props.isIndeterminate
? "white"
: props.color
: props.theme.checkbox.hoverIndeterminateColor};
`}
}

View File

@ -357,7 +357,7 @@ const Base = {
disableIndeterminateColor: gray,
hoverBorderColor: gray,
hoverIndeterminateColor: gray,
hoverIndeterminateColor: black,
},
// slider: {