-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
52 lines (44 loc) · 984 Bytes
/
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
// require('react-native').unstable_enableLogBox();
import React, { useState } from 'react';
import {
StyleSheet,
View,
Appearance,
} from 'react-native';
import { DefaultTheme, Provider as PaperProvider, useTheme } from "react-native-paper";
import Routes from './src/routes'
const light = {
...DefaultTheme,
roundnesS: 2,
colors: {
...DefaultTheme.colors,
background: '#FFFFFF',
button: '#F94851',
txt: '#707070'
}
}
const dark = {
...DefaultTheme,
roundnesS: 2,
colors: {
...DefaultTheme.colors,
background: '#000C1E',
button: '#CC333E',
txt: '#FFFFFF'
}
}
const colorScheme = Appearance.getColorScheme();
export default function App() {
const { colors } = useTheme();
return (
<PaperProvider style={styles.container} theme={colorScheme === 'dark' ? dark : light}>
<Routes/>
</PaperProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
});