-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
35 lines (30 loc) · 943 Bytes
/
App.tsx
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/
import React from 'react';
import {SafeAreaView, StatusBar, useColorScheme} from 'react-native';
import {Colors} from 'react-native/Libraries/NewAppScreen';
import {ThemeProvider} from 'styled-components';
import theme from './src/global/styles/theme';
import {Route} from './src/routes/Route';
export const App = () => {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
flex: 1,
};
return (
<SafeAreaView style={backgroundStyle}>
<ThemeProvider theme={theme}>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<Route />
</ThemeProvider>
</SafeAreaView>
);
};