-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
50 lines (42 loc) · 1.45 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
import React from 'react';
import { Platform, UIManager } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
// Local imports
import Root from './Root';
import Settings, { SettingsProvider } from './Settings';
import TagEditModal from './TagEditModal';
// RNGH
import { GestureHandlerRootView } from 'react-native-gesture-handler'
// Paper
import {
Provider as PaperProvider,
DefaultTheme,
} from 'react-native-paper';
if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
const StackNavigator = createNativeStackNavigator();
const mainTheme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
text: '#333',
}
}
const App = () => (
<PaperProvider theme={mainTheme}>
<GestureHandlerRootView>
<NavigationContainer>
<SettingsProvider>
<StackNavigator.Navigator screenOptions={{ headerShown: false, presentation: "card", animationEnabled: true }}>
<StackNavigator.Screen name="Root" component={Root} />
<StackNavigator.Screen name="Settings" component={Settings} />
<StackNavigator.Screen name="Edit" component={TagEditModal} />
</StackNavigator.Navigator>
</SettingsProvider>
</NavigationContainer>
</GestureHandlerRootView>
</PaperProvider>
);
export default App;