|
1 | 1 | import React from 'react';
|
2 | 2 | import {createDrawerNavigator} from '@react-navigation/drawer';
|
3 |
| -import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; |
4 | 3 |
|
5 | 4 | import DashboardNavigator from './DashboardNavigator';
|
6 | 5 | import CustomDrawerContent from './ContentDrawer';
|
| 6 | +import {primaryColor} from '../theme'; |
7 | 7 |
|
8 | 8 | const Drawer = createDrawerNavigator();
|
9 | 9 |
|
10 | 10 | export default function DrawerNavigator(props) {
|
11 | 11 | return (
|
12 | 12 | <Drawer.Navigator
|
13 |
| - // headerLeft={() => ( |
14 |
| - // <Icon |
15 |
| - // style={{paddingLeft: 10}} |
16 |
| - // onPress={() => navigation.openDrawer()} |
17 |
| - // name={Platform.OS === 'ios' ? 'ios-menu' : 'md-menu'} |
18 |
| - // size={30} |
19 |
| - // /> |
20 |
| - // )} |
21 |
| - // headerMode="screen" |
22 |
| - // screenOptions={{ |
23 |
| - // headerTintColor: 'white', |
24 |
| - // headerStyle: {backgroundColor: 'tomato'}, |
25 |
| - // }} |
26 |
| - // drawerStyle={{ |
27 |
| - // backgroundColor: '#c6cbef', |
28 |
| - // width: 240, |
29 |
| - // }} |
| 13 | + // drawerBackgroundColor="#c6cbef" |
| 14 | + drawerPosition="left" // "left", "right" |
| 15 | + drawerType="front" // "back", "front", "slide" |
| 16 | + drawerWidth={250} |
| 17 | + // edgeWidth |
| 18 | + hideStatusBar={true} |
| 19 | + statusBarAnimation="fade" // "fade", "none", "slide" |
| 20 | + keyboardDismissMode="none" // "none", "on-drag" |
| 21 | + // minSwipeDistance |
| 22 | + // overlayColor={0} // 0, 1 |
| 23 | + // lazy={true} // true, false |
| 24 | + defaultNavigationOptions={{}} |
| 25 | + drawerOpenRoute="DrawerOpen" |
| 26 | + drawerCloseRoute="DrawerClose" |
| 27 | + drawerToggleRoute="DrawerToggle" |
30 | 28 | drawerContentOptions={{
|
31 |
| - // activeTintColor: primaryColor, |
| 29 | + activeTintColor: primaryColor, |
32 | 30 | itemStyle: {marginVertical: 0},
|
33 | 31 | }}
|
34 | 32 | drawerContent={newProps => (
|
|
0 commit comments