-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.jsx
80 lines (72 loc) · 2.22 KB
/
App.jsx
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
import React, {useState} from 'react';
import {StyleSheet} from 'react-native';
import {DefaultTheme, Provider as PaperProvider} from 'react-native-paper';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Inicio from './src/views/Inicio';
import NuevoCliente from './src/views/NuevoCliente';
import DetallesCliente from './src/views/DetallesCliente';
import BarraSuperior from './src/components/BarraSuperior';
const Stack = createNativeStackNavigator();
// Definir el tema
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: '#1774F2',
accent: '#0655BF',
},
};
function App() {
return (
<PaperProvider>
<NavigationContainer>
<Stack.Navigator initialRouteName="Inicio">
<Stack.Screen
name="Inicio"
component={Inicio}
screenOptions={{
headerStyle: {
backgroundColor: theme.colors.primary,
},
headerTintColor: theme.colors.surface,
headerTitleStyle: {
fontWeight: 'bold',
},
}}
options={({navigation, route}) => ({
headerTitleAlign: 'center',
// headerLeft: props => (
// <BarraSuperior
// {...props}
// navigation={navigation}
// route={route}
// />)
})}
/>
<Stack.Screen
name="NuevoCliente"
component={NuevoCliente}
screenOptions={{
headerStyle: {
backgroundColor: theme.colors.primary,
},
headerTintColor: theme.colors.surface,
headerTitleStyle: {
fontWeight: 'bold',
},
}}
options={{title: 'Nuevo Cliente'}}
/>
<Stack.Screen
name="DetallesCliente"
component={DetallesCliente}
options={{title: 'Detalles Cliente'}}
/>
</Stack.Navigator>
</NavigationContainer>
</PaperProvider>
);
}
const styles = StyleSheet.create({});
export default App;