daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
  3. import { Home, Categories } from './views/';
  4. import { MenuButton } from './common';
  5. import { Button } from 'react-native';
  6. import Theme from './common/style/theme.style';
  7.  
  8. const StackHomeNavigator = createStackNavigator(
  9.   {
  10.     Home: {
  11.       screen: Home,
  12.       navigationOptions: {
  13.         title: 'Home',
  14.       },
  15.     },
  16.   },
  17.   {
  18.     navigationOptions: ({ navigation }) => ({
  19.       headerLeft: <MenuButton navigation={navigation} />,
  20.       headerStyle: {
  21.         backgroundColor: Theme.PRIMARY_COLOR,
  22.       },
  23.       headerTitleStyle: {
  24.         color: '#fff',
  25.       },
  26.       headerTintColor: {
  27.         color: 'red',
  28.       },
  29.     }),
  30.   }
  31. );
  32.  
  33. const StackCategoriesNavigator = createStackNavigator(
  34.   {
  35.     Home: {
  36.       screen: Categories,
  37.       navigationOptions: {
  38.         title: 'Categories',
  39.       },
  40.     },
  41.   },
  42.   {
  43.     navigationOptions: ({ navigation }) => ({
  44.       headerLeft: <MenuButton navigation={navigation} />,
  45.       headerStyle: {
  46.         backgroundColor: Theme.PRIMARY_COLOR,
  47.       },
  48.       headerTitleStyle: {
  49.         color: '#fff',
  50.       },
  51.       headerTintColor: {
  52.         color: 'red',
  53.       },
  54.     }),
  55.   }
  56. );
  57.  
  58. export const Drawer = createDrawerNavigator({
  59.   Home: {
  60.     screen: StackHomeNavigator,
  61.   },
  62.   Categories: {
  63.     screen: StackCategoriesNavigator,
  64.   },
  65. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top