Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/Checkbox/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ export const HelperText = styled.label<StyledLabelProps>`
// box; the outline is what makes keyboard focus visible. MUI never sets
// `Mui-focusVisible` while disabled, so a focusable disabled input (one with a
// tooltip) is matched through `:has` instead.
// MUI's own checked/indeterminate color rule is as specific as `&.Mui-checked`
// and can be injected after it (it is in BigBlueButton), so the brand color
// doubles the class to win either way. A disabled box keeps MUI's disabled color.
export const StyledCheckbox = styled(MuiCheckbox)<StyledCheckboxProps>`
&.MuiCheckbox-root {
padding: 0;
border-radius: ${({ $round }) => ($round ? '50%' : borderRadiusSmall)};
}

&.Mui-checked {
&&.Mui-checked:not(.Mui-disabled),
&&.MuiCheckbox-indeterminate:not(.Mui-disabled) {
color: ${colorBrand1};
}

Expand Down
Loading