Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(components, protocol-designer): menuList and MenuItem cleanup for helix #17257

Open
wants to merge 5 commits into
base: edge
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
address feedback
  • Loading branch information
jerader committed Jan 15, 2025
commit 5ea466036650c318579df9b884e776f690a4f1a1
3 changes: 2 additions & 1 deletion components/src/atoms/MenuList/index.tsx
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ export const MenuList = forwardRef<HTMLDivElement, MenuListProps>(
top = '2.6rem',
right = `calc(50% + ${SPACING.spacing4})`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid using calc for a prop.

width = FLEX_MAX_CONTENT,
zIndex = 10,
...restProps
} = props
return isOnDevice ? (
@@ -48,7 +49,7 @@ export const MenuList = forwardRef<HTMLDivElement, MenuListProps>(
) : (
<Flex
borderRadius={BORDERS.borderRadius8}
zIndex={12}
zIndex={zIndex}
boxShadow="0px 1px 3px rgba(0, 0, 0, 0.2)"
position={POSITION_ABSOLUTE}
backgroundColor={COLORS.white}
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ import {
MenuItem,
MenuList,
OVERFLOW_AUTO,
POSITION_ABSOLUTE,
SPACING,
StyledText,
TYPOGRAPHY,
@@ -44,7 +43,6 @@ export function LiquidsOverflowMenu(
const dispatch: ThunkDispatch<any> = useDispatch()
return (
<MenuList
position={POSITION_ABSOLUTE}
zIndex={12}
right={location.pathname === '/liquids' ? SPACING.spacing12 : '3.125rem'}
top={`calc(${NAV_HEIGHT} - 6px)`}
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ export function StepOverflowMenu(props: StepOverflowMenuProps): JSX.Element {
return (
<>
<MenuList
zIndex={12}
ref={menuRootRef}
top={top}
left="18.75rem"
Loading