-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
72 lines (54 loc) · 1.61 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
import { Text, View, Stylesheet, Button } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Estilos from './estilos/Estilos';
import AreaTriangulo from './telas/AreaTriangulo';
import Juros from './telas/Juros';
import Conversao from './telas/Conversao';
import Desconto from './telas/Conversao';
import Et_Ga from './telas/Et_Ga';
//Páginas do app
function HomeScreen ({ navigation }) {
return (
<View style={Estilos.container}>
<Text style={Estilos.paragraph}>Canivete</Text>
<Button
title="Desconto"
onPress={() => navigation.navigate('AreaTriangulo')}
/>
<Button
title="Juros"
onPress={() => navigation.navigate('Juros')}
/>
<Button
title="Conversao"
onPress={() => navigation.navigate('Conversao')}
/>
<Button
title="Etanol X Gasolina"
onPress={() => navigation.navigate('Et_Ga')}
/>
</View>
);
}
const Stack = createNativeStackNavigator();
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator initial RouteName="Home">
<Stack.Screen name="Home" component={HomeScreen} options={{ title: 'Home' }
} />
<Stack.Screen name="AreaTriangulo" component={AreaTriangulo} options={{ title:
'Desconto'}} />
<Stack.Screen name="Juros" component={Juros} options={{ title:
'Juros'}} />
<Stack.Screen name="Conversao" component={Conversao} options={{ title:
'Conversao'}} />
<Stack.Screen name="Desconto" component={Desconto} options={{ title:
'Desconto'}} />
<Stack.Screen name="Et_Ga" component={Et_Ga} options={{ title:
'Et_Ga'}} />
</Stack.Navigator>
</NavigationContainer>
);
}