Skip to content

Commit

Permalink
[Stateful sidenav] Fix side nav panel clipping (elastic#194268)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga authored Sep 27, 2024
1 parent 21a8bf8 commit c01de8c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ interface Props {
isSideNavCollapsed$: Observable<boolean>;
}

const PANEL_WIDTH = 290;

export const ProjectNavigation: FC<PropsWithChildren<Props>> = ({
children,
isSideNavCollapsed$,
Expand All @@ -29,11 +31,10 @@ export const ProjectNavigation: FC<PropsWithChildren<Props>> = ({
data-test-subj="projectLayoutSideNav"
isCollapsed={isCollapsed}
onCollapseToggle={toggleSideNav}
css={
isCollapsed
? undefined
: { overflow: 'visible', clipPath: 'polygon(0 0, 300% 0, 300% 100%, 0 100%)' }
}
css={{
overflow: 'visible',
clipPath: `polygon(0 0, calc(var(--euiCollapsibleNavOffset) + ${PANEL_WIDTH}px) 0, calc(var(--euiCollapsibleNavOffset) + ${PANEL_WIDTH}px) 100%, 0 100%)`,
}}
>
{children}
</EuiCollapsibleNavBeta>
Expand Down

0 comments on commit c01de8c

Please sign in to comment.