aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-18 01:23:40 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-18 01:23:40 +0800
commitfb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89 (patch)
tree4d61dc017e502aea4a8e65ab207c3624e0233994 /packages
parent5e4defefb06ed886573abeb61ac5036836150f34 (diff)
downloaddexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.gz
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.bz2
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.lz
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.xz
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.tar.zst
dexon-sol-tools-fb623cf63b3c7474f4bfb4bc37dd4afa9ec51e89.zip
Untoggles nav on headroom unpin
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/@next/components/header.tsx8
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}>