Skip to content

Commit

Permalink
checkbox: disabled checked checkbox should be selectedActive color wi…
Browse files Browse the repository at this point in the history
…th opacity 0.5
  • Loading branch information
ChengYanJin committed Jul 7, 2023
1 parent 7a46d8e commit 4d609fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/components/checkbox/Checkbox.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ const StyledCheckbox = styled.label<{
[type='checkbox']:disabled {
cursor: not-allowed;
background-color: ${(props) => getTheme(props).textSecondary};
background-color: ${(props) => {
if (props.checked) {
return getTheme(props).selectedActive;
} else {
return getTheme(props).textSecondary;
}
}};
}
`;

0 comments on commit 4d609fb

Please sign in to comment.