Web:Common:Fix ToggleButtonTheme.

This commit is contained in:
Vlada Gazizova 2022-08-16 13:42:31 +03:00
parent eab910e973
commit bde4a1f019

View File

@ -4,20 +4,22 @@ import {
ToggleButtonContainer,
} from "@docspace/components/toggle-button/styled-toggle-button";
const getDefaultStyles = ({ currentColorScheme, isDisabled, isChecked }) => css`
${ToggleButtonContainer} {
svg {
rect {
fill: ${isChecked && currentColorScheme.accentColor};
opacity: ${isDisabled && "0.6"};
&:hover {
const getDefaultStyles = ({ currentColorScheme, isDisabled, isChecked }) =>
currentColorScheme &&
css`
${ToggleButtonContainer} {
svg {
rect {
fill: ${isChecked && currentColorScheme.accentColor};
opacity: ${isDisabled && "0.6"};
&:hover {
fill: ${isChecked && currentColorScheme.accentColor};
opacity: ${isDisabled && "0.6"};
}
}
}
}
}
`;
`;
export default styled(Container)(getDefaultStyles);