fix: group by disabled in dark mode wrong color (#9662)

<img width="255" alt="Screenshot 2025-01-16 at 10 51 50 AM"
src="https://github.com/user-attachments/assets/c171401e-6c19-42f1-975b-fdb33b0a0789"
/>
This commit is contained in:
Jérémy M
2025-01-16 11:15:03 +01:00
committed by GitHub
parent 26058f3e25
commit f74b12adb8

View File

@ -41,11 +41,7 @@ export const StyledMenuItemBase = styled.div<MenuItemBaseProps>`
(disabled || isHoverBackgroundDisabled) ?? HOVER_BACKGROUND};
${({ theme, accent, disabled }) => {
if (!isUndefined(disabled) && disabled !== false) {
return css`
opacity: 0.4;
`;
}
const isDisabled = !isUndefined(disabled) && disabled !== false;
switch (accent) {
case 'danger': {
@ -54,17 +50,20 @@ export const StyledMenuItemBase = styled.div<MenuItemBaseProps>`
&:hover {
background: ${theme.background.transparent.danger};
}
${isDisabled && `opacity: 0.4;`}
`;
}
case 'placeholder': {
return css`
color: ${theme.font.color.tertiary};
${isDisabled && `opacity: 0.4;`}
`;
}
case 'default':
default: {
return css`
color: ${theme.font.color.secondary};
${isDisabled && `opacity: 0.4;`}
`;
}
}