Skip to content

Commit

Permalink
Set the default value of the DrawerNavigatorConfig correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
混沌DM committed Dec 19, 2017
1 parent ef63b23 commit 7804a69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/navigators/DrawerNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,17 @@ const DefaultDrawerConfig = {
return Math.min(smallerAxisSize - appBarHeight, maxWidth);
},
contentComponent: defaultContentComponent,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',
drawerPosition: 'left',
drawerBackgroundColor: 'white',
useNativeAnimations: true,
};

const DrawerNavigator = (
routeConfigs: NavigationRouteConfigMap,
config: DrawerNavigatorConfig = {
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',
}
config: DrawerNavigatorConfig = {}
) => {
const mergedConfig = { ...DefaultDrawerConfig, ...config };
const {
Expand Down
6 changes: 3 additions & 3 deletions src/views/Drawer/DrawerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export type DrawerViewConfig = {
drawerLockMode?: 'unlocked' | 'locked-closed' | 'locked-open',
drawerWidth?: number | (() => number),
drawerPosition?: 'left' | 'right',
drawerOpenRoute: string,
drawerCloseRoute: string,
drawerToggleRoute: string,
drawerOpenRoute?: string,
drawerCloseRoute?: string,
drawerToggleRoute?: string,
contentComponent?: React.ComponentType<*>,
contentOptions?: {},
style?: ViewStyleProp,
Expand Down

0 comments on commit 7804a69

Please sign in to comment.