import React, { Component } from 'react'; import { Platform, StyleSheet, View, TouchableOpacity } from 'react-native'; import { scale, verticalScale, moderateScale } from 'react-native-size-matters'; import Icon from 'react-native-vector-icons/dist/Ionicons'; import Icon2 from 'react-native-vector-icons/dist/MaterialCommunityIcons'; import Text from 'react-native-text'; //function import { width, height } from '../../config/screen'; import Size from '../../config/size' const size = new Size; export default class DrawerNavigationHeader extends Component { logoutIcon() { if (this.props.logout == true) { return( this.props.onPress && this.props.onPress()} /> ) } } render() { return ( { this.props.navigation.navigate('DrawerOpen'); }} /> {this.props.title} {this.logoutIcon()} ); } }