Add an overlay when the left menu is opened in slide out mode

This commit is contained in:
Jackson Harper 2024-07-11 09:39:43 +08:00
parent 619fb3ad45
commit e85672dd75

View file

@ -143,6 +143,26 @@ export function NavigationLayout(props: NavigationLayoutProps): JSX.Element {
},
}}
></SpanBox>
<SpanBox
css={{
display: 'none',
position: 'fixed',
zIndex: '2',
backgroundColor: 'var(--colors-overlay)',
'@mdDown': {
display: 'flex',
top: '0px',
left: LIBRARY_LEFT_MENU_WIDTH,
width: '100vw',
height: '100vh',
pointerEvents: 'auto',
},
}}
onClick={(event) => {
props.setShowNavigationMenu(false)
event.stopPropagation()
}}
></SpanBox>
</>
)}
{props.children}