-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
74 lines (70 loc) · 2.18 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
import { NativeBaseProvider } from 'native-base';
import Toast, { BaseToast } from 'react-native-toast-message';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import InicioScreen from './screens/InicioScreen';
import RegistrarEntradaScreen from './screens/RegistrarEntradaScreen';
import PrestamoComputadoraScreen from './screens/PrestamoComputadoraScreen';
import PrestamoLibroScreen from './screens/PrestamoLibroScreen';
import DevolucionLibroScreen from './screens/DevolucionLibroScreen';
import EscanerModal from "./modals/EscanerModal";
const Stack = createStackNavigator();
const toastTextStyle = {
text1Style: {
fontSize: 15,
},
text2Style: {
fontSize: 15,
color: '#5B5B5B',
fontWeight: '500'
},
text2NumberOfLines: 0
}
const toastConfig = {
info: (props) => (
<BaseToast
{...props}
{...toastTextStyle}
style={{ borderLeftColor: '#9C9C9C' }}
/>
),
success: (props) => (
<BaseToast
{...props}
{...toastTextStyle}
style={{ borderLeftColor: '#16BF2B' }}
/>
),
error: (props) => (
<BaseToast
{...props}
{...toastTextStyle}
style={{ borderLeftColor: '#EC0909' }}
/>
),
};
export default function App() {
return (
<NavigationContainer>
<NativeBaseProvider>
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Group>
<Stack.Screen name="Inicio" component={InicioScreen} />
<Stack.Screen name="RegistrarEntrada" component={RegistrarEntradaScreen} />
<Stack.Screen name="PrestamoComputadora" component={PrestamoComputadoraScreen} />
<Stack.Screen name="PrestamoLibro" component={PrestamoLibroScreen} />
<Stack.Screen name="DevolucionLibro" component={DevolucionLibroScreen} />
</Stack.Group>
<Stack.Group screenOptions={{ presentation: 'modal' }}>
<Stack.Screen name="Escaner" component={EscanerModal} />
</Stack.Group>
</Stack.Navigator>
<Toast config={toastConfig}/>
</NativeBaseProvider>
</NavigationContainer>
);
}