diff options
Diffstat (limited to 'packages/website/ts/@next/components/siteWrap.tsx')
-rw-r--r-- | packages/website/ts/@next/components/siteWrap.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/siteWrap.tsx b/packages/website/ts/@next/components/siteWrap.tsx index c1513c647..6bbe73479 100644 --- a/packages/website/ts/@next/components/siteWrap.tsx +++ b/packages/website/ts/@next/components/siteWrap.tsx @@ -124,7 +124,7 @@ export class SiteWrap extends React.Component<Props, State> { const currentTheme = GLOBAL_THEMES[theme]; return ( - <> + <Container isNavToggled={isMobileNavOpen}> <ThemeProvider theme={currentTheme}> <> <GlobalStyles /> @@ -141,11 +141,20 @@ export class SiteWrap extends React.Component<Props, State> { <Footer/> </> </ThemeProvider> - </> + </Container> ); } } +const Container = styled.div` + width: 100vw; + height: 100%; + position: fixed; + overflow-x: hidden; + overflow-y: ${props => props.isNavToggled ? 'hidden' : 'auto'}; + -webkit-overflow-scrolling: touch; +`; + const Main = styled.main<MainProps>` transition: transform 0.5s, opacity 0.5s; transform: translate3d(0, ${props => props.isNavToggled ? '357px' : 0}, 0); |