-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
133 lines (125 loc) · 3.75 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Ionicons } from '@expo/vector-icons';
import TelaDeInicio from './telas/TelaDeInicio';
import TelaDeLogin from './telas/TelaDeLogin';
import TelaDeCadastro from './telas/TelaDeCadastro';
import TelaMenu from './telas/TelaMenu';
import TelaFavorito from './telas/TelaFavorito';
import TelaAgenda from './telas/TelaAgenda';
import TelaReservaAntes from './telas/TelaReservaAntes';
import TelaPagamento from './telas/TelaPagamento';
import TelaConfirma from './telas/TelaConfirma';
import Telaleaf from './telas/TelaLeaf';
import TelaTesla from './telas/TelaTesla';
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
const TabNavigator = () => {
return (
<Tab.Navigator
screenOptions={{
tabBarShowLabel: false,
tabBarStyle: {
position: 'absolute',
backgroundColor: '#5A5DBA',
borderTopWidth: 0,
bottom: 5,
left: 10,
right: 10,
elevation: 0,
borderRadius: 15,
height: 60,
},
}}>
<Tab.Screen
name="menu"
component={TelaMenu}
options={{
headerShown: false, tabBarIcon: ({ color, size, focused }) => {
if (focused) {
return <Ionicons name="home" size={size} color={color} />;
}
return <Ionicons name="home-outline" size={size} color={color}/>
}
}}
/>
<Tab.Screen
name="favorito"
component={TelaFavorito}
options={{
headerShown: false ,tabBarIcon: ({ color, size, focused }) => {
if (focused) {
return <Ionicons name="heart" size={size} color={color} />;
}
return <Ionicons name="heart-outline" size={size} color={color}/>
}}}
/>
<Tab.Screen
name="agenda"
component={TelaAgenda}
options={{ headerShown: false ,tabBarIcon: ({ color, size, focused }) => {
if (focused) {
return <Ionicons name="book" size={size} color={color} />;
}
return <Ionicons name="book-outline" size={size} color={color}/>
}}}
/>
</Tab.Navigator>
);
};
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="home">
<Stack.Screen
name="home"
component={TelaDeInicio}
options={{ headerShown: false }}
/>
<Stack.Screen
name="login"
component={TelaDeLogin}
options={{ headerShown: false }}
/>
<Stack.Screen
name="cadastro"
component={TelaDeCadastro}
options={{ headerShown: false }}
/>
<Stack.Screen
name="menu"
component={TabNavigator}
options={{ headerShown: false }}
/>
<Stack.Screen
name="leaf"
component={Telaleaf}
options={{ headerShown: false }}
/>
<Stack.Screen
name="tesla"
component={TelaTesla}
options={{ headerShown: false }}
/>
<Stack.Screen
name="reserva"
component={TelaReservaAntes}
options={{ headerShown: false }}
/>
<Stack.Screen
name="pagamento"
component={TelaPagamento}
options={{ headerShown: false }}
/>
<Stack.Screen
name="confirma"
component={TelaConfirma}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;