diff options
author | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-12-18 01:23:40 +0800 |
---|---|---|
committer | Ezekiel Aquino <ezekiel@bakkenbaeck.no> | 2018-12-18 01:23:40 +0800 |
commit | fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89 (patch) | |
tree | 4d61dc017e502aea4a8e65ab207c3624e0233994 /packages/website/ts/@next/components | |
parent | 5e4defefb06ed886573abeb61ac5036836150f34 (diff) | |
download | dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.gz dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.zst dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.zip |
Untoggles nav on headroom unpin
Diffstat (limited to 'packages/website/ts/@next/components')
-rw-r--r-- | packages/website/ts/@next/components/header.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/website/ts/@next/components/header.tsx b/packages/website/ts/@next/components/header.tsx index 035eebe53..cc68739ed 100644 --- a/packages/website/ts/@next/components/header.tsx +++ b/packages/website/ts/@next/components/header.tsx @@ -68,11 +68,17 @@ const navItems: NavItemProps[] = [ ]; class HeaderBase extends React.Component<HeaderProps> { + public onUnpin = () => { + if (this.props.isNavToggled) { + this.props.toggleMobileNav(); + } + } + public render(): React.ReactNode { const { isNavToggled, toggleMobileNav, theme } = this.props; return ( - <Headroom> + <Headroom onUnpin={this.onUnpin}> <StyledHeader isNavToggled={isNavToggled}> <HeaderWrap> <ReactRouterLink to={WebsitePaths.Home}> |