Skip to content

Commit

Permalink
Merge pull request #50 from heyjul3s/fix/docs-code-scroll
Browse files Browse the repository at this point in the history
move Navbar out of NavContainer and update pointer events
  • Loading branch information
heyjul3s committed Jan 15, 2021
2 parents b5af83c + f80ac1b commit 097b953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/components/Nav/Mobile/MobileNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export function MobileNav() {
setViewIndex
}}
>
<NavContainer>
<NavContainer panelOpen={panelOpen}>
<NavSlides />
<Navbar />
</NavContainer>
<Navbar />
</MobileNavContext.Provider>
);
}
3 changes: 2 additions & 1 deletion docs/components/Nav/Mobile/styles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import styled from 'styled-components';

export const NavContainer = styled.div`
export const NavContainer = styled.div<{ panelOpen: boolean }>`
position: fixed;
top: 0;
left: 0;
z-index: 1;
pointer-events: ${({ panelOpen }) => (!!panelOpen ? 'auto' : 'none')};
`;

export const SVGwrapper = styled.svg`
Expand Down

0 comments on commit 097b953

Please sign in to comment.