-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
28 lines (25 loc) · 1.01 KB
/
routes.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
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import RouteHeader from './components/RouteHeader';
import BMICalculator from './pages/BMICalculator';
import HomePage from './pages/HomePage';
import Jokenpo from './pages/Jokenpo';
const { Navigator, Screen } = createStackNavigator();
export default function Routes () {
return (
<NavigationContainer>
<Navigator screenOptions={ { headerShown: false, cardStyle: { backgroundColor: "#3498db" } } }>
<Screen name="Home Page" component={HomePage} />
<Screen name="BMI Calculator" component={BMICalculator} options={{
headerShown: true,
header: () => <RouteHeader title="Calculadora de IMC" />
}} />
<Screen name="Jokenpo" component={Jokenpo} options={{
headerShown: true,
header: () => <RouteHeader title="Pedra, papel, tesoura" />
}} />
</Navigator>
</NavigationContainer>
)
}