From 6db28c530066454e84738451dc66bbdf29243b2d Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Fri, 14 Dec 2018 16:06:06 +0100 Subject: Fix mobile nav hamburger open state --- packages/website/ts/@next/components/header.tsx | 29 +++---------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/packages/website/ts/@next/components/header.tsx b/packages/website/ts/@next/components/header.tsx index 97356f4b2..ced2aee76 100644 --- a/packages/website/ts/@next/components/header.tsx +++ b/packages/website/ts/@next/components/header.tsx @@ -15,17 +15,12 @@ import { ThemeInterface } from 'ts/@next/components/siteWrap'; import { Paragraph } from 'ts/@next/components/text'; interface HeaderProps { - isOpen?: boolean; location?: Location; isNavToggled?: boolean; toggleMobileNav?: () => void; theme: ThemeInterface; } -interface HeaderState { - isOpen: boolean; -} - interface NavItem { url?: string; id?: string; @@ -75,23 +70,12 @@ const navItems: NavItem[] = [ }, ]; -class HeaderBase extends React.Component { - public state = { - isOpen: false, - }; - - public onMenuButtonClick = (): void => { - this.setState({ - isOpen: !this.state.isOpen, - }); - } - +class HeaderBase extends React.Component { public render(): React.ReactNode { - const { isOpen } = this.state; const { isNavToggled, toggleMobileNav, theme } = this.props; return ( - + @@ -116,7 +100,7 @@ class HeaderBase extends React.Component { - + @@ -147,13 +131,6 @@ const NavItem = (props: { link: NavItem; key: string }) => { const StyledHeader = styled.header` padding: 30px; - - @media (max-width: 800px) { - min-height: ${props => props.isOpen ? '385px' : '70px'}; - overflow: hidden; - position: relative; - transition: min-height 0.25s ease-in-out; - } `; const LinkWrap = styled.li` -- cgit v1.2.3