This repository has been archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigation.js
75 lines (72 loc) · 1.64 KB
/
navigation.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import React from 'react';
import { createBottomTabNavigator, createStackNavigator } from 'react-navigation';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import NewDeckScreen from './views/NewDeck';
import DecksScreen from './views/Decks';
import DeckScreen from './views/DeckDetail';
import AddCardScreen from './views/AddCard';
import QuizScreen from './views/Quiz';
import { primary } from './util/colors';
const DecksStack = createStackNavigator(
{
Decks: {
screen: DecksScreen,
navigationOptions: {
title: 'Awesome Mobile Flashcards'
}
},
DeckDetail: {
screen: DeckScreen,
navigationOptions: {
title: 'Deck details'
}
},
AddCard: {
screen: AddCardScreen,
navigationOptions: {
title: 'Add card'
}
},
Quiz: {
screen: QuizScreen,
navigationOptions: {
title: 'Quiz'
}
},
},
{
navigationOptions: {
headerStyle: {
backgroundColor: primary
},
headerTintColor: 'white'
}
});
export default createBottomTabNavigator(
{
Decks: {
screen: DecksStack,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<MaterialCommunityIcons name='cards-outline' size={30} color={tintColor} />
),
}
},
NewDeck: {
screen: NewDeckScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<MaterialCommunityIcons name='plus' size={30} color={tintColor} />
),
}
},
},
{
tabBarOptions: {
activeTintColor: 'white',
style: {
backgroundColor: primary
}
}
}
);