Ver código fonte

Upload files to ''

dayanlee.deleon 1 ano atrás
pai
commit
bf09ef8d3c
2 arquivos alterados com 53 adições e 0 exclusões
  1. 16
    0
      drawer.js
  2. 37
    0
      homeStack.js

+ 16
- 0
drawer.js Ver arquivo

@@ -0,0 +1,16 @@
1
+import { createDrawerNavigator } from "react-navigation-drawer";
2
+import { createAppContainer } from "react-navigation";
3
+
4
+import HomeStack from './homeStack';
5
+import About from './screens/about';
6
+
7
+const RootDrawerNavigator = createDrawerNavigator ({
8
+    Home: {
9
+        screen: HomeStack,
10
+    },
11
+    About: {
12
+        screen: About,
13
+    }
14
+})
15
+
16
+export default createAppContainer(RootDrawerNavigator);

+ 37
- 0
homeStack.js Ver arquivo

@@ -0,0 +1,37 @@
1
+import * as React from 'react';
2
+import { createStackNavigator } from "react-navigation-stack";
3
+import { createAppContainer } from "react-navigation";
4
+import About from '../screens/about'
5
+import Gallery from '../screens/gallery'
6
+import Header from '../shared/header';
7
+
8
+const screens = {
9
+    About: {
10
+        screen: About,
11
+        navigationOptions: ({navigation}) => {
12
+            return {
13
+                headerTitle: () => <Header navigation={navigation}/>,
14
+            }
15
+        }
16
+    },
17
+    Gallery: {
18
+        screen: Gallery,
19
+        navigationOptions: ({navigation}) => {
20
+            return {
21
+                headerTitle: () => <Header navigation={navigation}/>,
22
+            }
23
+        }
24
+    },
25
+    Calendar: {
26
+        screen: Calendar,
27
+        navigationOptions: ({navigation}) => {
28
+            return {
29
+                headerTitle: () => <Header navigation={navigation}/>,
30
+            }
31
+        }
32
+    },
33
+}
34
+
35
+const HomeStack = createStackNavigator(screens);
36
+
37
+export default createAppContainer(HomeStack);