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