From 58477fcf4036825242de751141e5d526e57fc87d Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Tue, 27 Feb 2018 18:34:05 -0800 Subject: [PATCH] Drawer Router (#3618) --- .../NavigationPlayground/js/Drawer.js | 14 ++- .../NavigationPlayground/js/MultipleDrawer.js | 12 +-- .../react-navigation/flow/react-navigation.js | 6 -- .../react-navigation/src/NavigationActions.js | 19 ++++ .../src/addNavigationHelpers.js | 4 + .../src/navigators/DrawerNavigator.js | 28 ++---- .../src/routers/DrawerRouter.js | 55 +++++++++++ .../src/routers/StackRouter.js | 3 - .../react-navigation/src/routers/TabRouter.js | 3 - .../routers/__tests__/DrawerRouter-test.js | 72 +++++++++++++++ .../src/routers/getScreenConfigDeprecated.js | 7 -- .../src/views/Drawer/DrawerView.js | 92 +++---------------- .../src/views/StackView/StackViewLayout.js | 1 - 13 files changed, 178 insertions(+), 138 deletions(-) create mode 100644 packages/react-navigation/src/routers/DrawerRouter.js create mode 100644 packages/react-navigation/src/routers/__tests__/DrawerRouter-test.js delete mode 100644 packages/react-navigation/src/routers/getScreenConfigDeprecated.js diff --git a/packages/react-navigation/examples/NavigationPlayground/js/Drawer.js b/packages/react-navigation/examples/NavigationPlayground/js/Drawer.js index 4d15c2a5..dfdd6d1a 100644 --- a/packages/react-navigation/examples/NavigationPlayground/js/Drawer.js +++ b/packages/react-navigation/examples/NavigationPlayground/js/Drawer.js @@ -4,7 +4,11 @@ import React from 'react'; import { Button, Platform, ScrollView, StatusBar } from 'react-native'; -import { StackNavigator, DrawerNavigator, SafeAreaView } from 'react-navigation'; +import { + StackNavigator, + DrawerNavigator, + SafeAreaView, +} from 'react-navigation'; import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import SampleText from './SampleText'; @@ -12,10 +16,7 @@ const MyNavScreen = ({ navigation, banner }) => ( {banner} -