Skip to content

Commit

Permalink
avoid clip-path in small menu
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Nov 5, 2024
1 parent 7332c8b commit 601b11e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/navigation-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,11 @@ const MainNavigationBarDesktopSection = ({
const MainNavigationBarContentWrapper = ({
children,
isLargeNavigationBar,
desktopSmallMenu,
}: {
children: React.ReactNode;
isLargeNavigationBar: boolean;
desktopSmallMenu: boolean;
}): JSX.Element => {
const {menuHeight} = useMainNavigationBarDesktopMenuState();
const topSpace = isLargeNavigationBar ? NAVBAR_HEIGHT_DESKTOP_LARGE : NAVBAR_HEIGHT_DESKTOP;
Expand All @@ -1135,7 +1137,9 @@ const MainNavigationBarContentWrapper = ({
<div
className={styles.mainNavigationBarContentWrapper}
style={{
clipPath: `rect(0 100% calc(${topSpace}px + ${menuHeight}) 0)`,
clipPath: !desktopSmallMenu
? `rect(0 100% calc(${topSpace}px + ${menuHeight}) 0)`
: undefined,
}}
>
{children}
Expand Down Expand Up @@ -1213,7 +1217,10 @@ export const MainNavigationBar = ({
{!desktopSmallMenu && (
<MainNavigationBarDesktopMenuBackground isLargeNavigationBar={hasBottomSections} />
)}
<MainNavigationBarContentWrapper isLargeNavigationBar={hasBottomSections}>
<MainNavigationBarContentWrapper
isLargeNavigationBar={hasBottomSections}
desktopSmallMenu={desktopSmallMenu}
>
<ResponsiveLayout>
<NavigationBarContentContainer ref={navigationBarRef} right={right}>
<div className={styles.mainNavbarContent}>
Expand Down

0 comments on commit 601b11e

Please sign in to comment.