diff options
-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}> |