// @flow import * as React from 'react'; import Icon from 'src/components/icon'; import { Wrapper, MenuContainer, MenuOverlay, Absolute } from './style'; type Props = { hasNavBar?: boolean, darkContext?: boolean, hasTabBar?: boolean, children: React$Node, }; type State = { menuIsOpen: boolean, }; class Menu extends React.Component { state = { menuIsOpen: false, }; toggleMenu() { this.setState({ menuIsOpen: !this.state.menuIsOpen }); } render() { const { hasNavBar, darkContext, hasTabBar } = this.props; const { menuIsOpen } = this.state; return ( this.toggleMenu()} /> {menuIsOpen && this.props.children} this.toggleMenu()} hasNavBar={hasNavBar} /> this.toggleMenu()} /> ); } } export default Menu;