// @flow import * as React from 'react'; import {Container, Right} from "native-base"; import CustomHeader from "./CustomHeader"; import CustomSideMenu from "./CustomSideMenu"; import CustomMaterialIcon from "./CustomMaterialIcon"; import {Platform, View} from "react-native"; import ThemeManager from "../utils/ThemeManager"; import Touchable from "react-native-platform-touchable"; type Props = { navigation: Object, headerTitle: string, headerRightButton: React.Node, children: React.Node } type State = { isOpen: boolean } export default class BaseContainer extends React.Component { static defaultProps = { headerRightMenu: }; state = { isOpen: false, }; toggle() { console.log('coucou'); this.setState({ isOpen: !this.state.isOpen, }); } updateMenuState(isOpen: boolean) { this.setState({isOpen}); } render() { return ( this.updateMenuState(isOpen)}> this.toggle()}> } rightButton={this.props.headerRightButton}/> {this.props.children} ); } }