import React from "react"; import {Body, Button, Header, Icon, Left, Right, Title} from "native-base"; import {StyleSheet} from "react-native"; import {getStatusBarHeight} from "react-native-status-bar-height"; import Touchable from 'react-native-platform-touchable'; export default class CustomHeader extends React.Component { render() { let button; let rightMenu; if (this.props.backButton !== undefined && this.props.backButton === true) button = this.props.navigation.goBack()}> ; else button = this.props.navigation.toggleDrawer()}> ; if (this.props.rightMenu) rightMenu = this.props.rightMenu; else rightMenu = ; return (
{button} {this.props.title} {rightMenu}
); } }; // Fix header in status bar on Android const styles = StyleSheet.create({ header: { paddingTop: getStatusBarHeight(), height: 54 + getStatusBarHeight(), }, });