From 4fc3b4ef29f87117016a14b0463f8e110fefe92c Mon Sep 17 00:00:00 2001 From: Chris Cedrone Date: Fri, 6 Oct 2023 11:43:55 -0400 Subject: [PATCH] Laura's notes --- .../DropdownExpandableMenuListItem.tsx | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/packages/react-magma-dom/src/components/Dropdown/DropdownExpandableMenuListItem.tsx b/packages/react-magma-dom/src/components/Dropdown/DropdownExpandableMenuListItem.tsx index 4eb23ffa1..346d0600a 100644 --- a/packages/react-magma-dom/src/components/Dropdown/DropdownExpandableMenuListItem.tsx +++ b/packages/react-magma-dom/src/components/Dropdown/DropdownExpandableMenuListItem.tsx @@ -4,22 +4,18 @@ import { ThemeContext } from '../../theme/ThemeContext'; import { DropdownContext } from './Dropdown'; import { Omit, useForkedRef } from '../../utils'; import { DropdownExpandableMenuGroupContext } from './DropdownExpandableMenuGroup'; -import { - DropdownMenuItem, - DropdownMenuItemProps, - menuBackground, -} from './DropdownMenuItem'; +import { DropdownMenuItem, DropdownMenuItemProps } from './DropdownMenuItem'; export interface DropdownExpandableMenuListItemProps - extends Omit {} + extends Omit { + testId?: string; +} function menuItemPadding(props) { - //For DropdownExpandableMenu styling with an icon - if (props.expandableMenuButtonHasIcon && props.isExpandablePanel) { - return `${props.theme.spaceScale.spacing03} ${props.theme.spaceScale.spacing05} ${props.theme.spaceScale.spacing03} 72px`; - } - //For DropdownExpandableMenu styling without an icon - else if (props.isExpandablePanel) { + if (props.isExpandablePanel) { + if (props.expandableMenuButtonHasIcon) { + return `${props.theme.spaceScale.spacing03} ${props.theme.spaceScale.spacing05} ${props.theme.spaceScale.spacing03} 72px`; + } return `${props.theme.spaceScale.spacing03} ${props.theme.spaceScale.spacing05} ${props.theme.spaceScale.spacing03} ${props.theme.spaceScale.spacing08}`; } } @@ -32,10 +28,6 @@ const StyledDropdownMenuItem = styled(DropdownMenuItem)<{ isInverse?: boolean; }>` padding: ${menuItemPadding}; - &:hover, - &:focus { - background: ${menuBackground}; - } `; export const DropdownExpandableMenuListItem = React.forwardRef< @@ -62,10 +54,7 @@ export const DropdownExpandableMenuListItem = React.forwardRef< {...other} expandableMenuButtonHasIcon={menuGroupContext.expandableMenuButtonHasIcon} isExpandablePanel={menuGroupContext.isExpandablePanel} - isFixedWidth={context.isFixedWidth} - isInverse={context.isInverse} ref={disabled ? null : ref} - role="menuitem" theme={theme} > {children}