-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
45 lines (42 loc) · 1.18 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import { Button } from 'react-native';
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
import ListsWithAnimations from './src/screens/ListsWithAnimations';
import InputsWithAnimations from './src/screens/InputsWithAnimations';
import EasingAnimations from './src/screens/EasingAnimations';
const DrawerNavigator = createDrawerNavigator(
{
ListsWithAnimations,
InputsWithAnimations,
EasingAnimations,
},
{
initialRouteName: 'ListsWithAnimations',
drawerBackgroundColor: 'skyblue',
contentOptions: {
activeBackgroundColor: 'rgba(0,0,0,0.5)',
activeTintColor: 'white',
inactiveTintColor: 'rgba(0,0,0,0.5)',
},
},
);
const RootStack = createStackNavigator(
{
Main: {
screen: DrawerNavigator,
headerMode: 'float',
navigationOptions: ({ navigation }) => ({
headerStyle: { backgroundColor: 'skyblue' },
title: 'Demo App',
headerTintColor: 'white',
headerLeft: <Button title="Menu" onPress={navigation.toggleDrawer} />,
}),
},
},
{
initialRouteName: 'Main',
},
);
export default function App() {
return <RootStack />;
}