Skip to content

Instantly share code, notes, and snippets.

@shawn-kb
Created March 6, 2018 22:11
Show Gist options
  • Save shawn-kb/8249e8de78a09fe1b3795249ebcf5422 to your computer and use it in GitHub Desktop.
Save shawn-kb/8249e8de78a09fe1b3795249ebcf5422 to your computer and use it in GitHub Desktop.
problem with site drawer
import React from 'react';
import { NavigationActions, DrawerNavigator } from 'react-navigation';
import RootNavigation from './RootNavigation';
import { Text } from 'react-native';
import { Icon, Button } from 'react-native-elements';
import SiteDetailsScreen from '../screens/SiteDetailsScreen';
import SiteHistoryScreen from '../screens/SiteHistoryScreen';
import SiteMessageHistoryScreen from '../screens/SiteMessageHistoryScreen';
const SiteDrawer = DrawerNavigator (
{
Details: {
screen: SiteDetailsScreen,
navigationOptions: {title: 'details'},
},
MessageHistory: {
screen: SiteMessageHistoryScreen,
navigationOptions: {title: 'message history'},
},
History: {
screen: SiteHistoryScreen,
navigationOptions: {title: 'history'},
},
},
{
headerMode: 'float',
navigationOptions: ({navigation}) => ({
title: 'details',
headerRight: <Button icon={{name: "reorder", color: "green"}}
onPress={() => navigation.navigate('DrawerOpen')}
backgroundColor={"white"}
outline={true}
color={'green'}
/>
})
});
export default SiteDrawer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment