-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (31 loc) · 995 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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import './global.css';
import {GluestackUIProvider} from '@/components/ui/gluestack-ui-provider';
import {useColorScheme} from 'nativewind';
import {Colors} from 'react-native/Libraries/NewAppScreen';
import {SafeAreaView, StatusBar} from 'react-native';
import ModalExample from './components/examples/ModalExample';
function App(): React.JSX.Element {
const {colorScheme} = useColorScheme();
const backgroundStyle = {
backgroundColor: colorScheme === 'dark' ? Colors.darker : Colors.lighter,
};
return (
<GluestackUIProvider mode="light">
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={colorScheme === 'light' ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ModalExample />
</SafeAreaView>
</GluestackUIProvider>
);
}
export default App;