-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
54 lines (51 loc) · 1.14 KB
/
App.js
File metadata and controls
54 lines (51 loc) · 1.14 KB
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {
Text,
HStack,
Switch,
useColorMode,
NativeBaseProvider,
StatusBar,
} from 'native-base';
import AppNavContainer from './src/navigations';
// Color Switch Component
function ToggleDarkMode() {
const { colorMode, toggleColorMode } = useColorMode();
return (
<HStack space={2} alignItems="center">
<Text>Dark</Text>
<Switch
isChecked={colorMode === 'light'}
onToggle={toggleColorMode}
aria-label={
colorMode === 'light' ? 'switch to dark mode' : 'switch to light mode'
}
/>
<Text>Light</Text>
</HStack>
);
}
const App = () => {
return (
<NativeBaseProvider>
<StatusBar translucent backgroundColor="transparent" />
{/* <Center
_dark={{ bg: 'blueGray.900' }}
_light={{ bg: 'blueGray.50' }}
px={4}
flex={1}>
<VStack space={5} alignItems="center"> */}
<AppNavContainer />
{/* </VStack>
</Center> */}
</NativeBaseProvider>
);
};
export default App;