-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
68 lines (63 loc) · 1.54 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import React, { useState } from 'react';
import { Text } from 'react-native';
import {
Body,
Button,
Container,
Content,
Footer,
FooterTab,
Header,
Icon,
Left,
Right,
Spinner,
Title
} from 'native-base';
import { Ionicons } from '@expo/vector-icons';
import { useFonts } from 'expo-font';
import CustomDrawer from './components/CustomDrawer';
export default function App() {
let [fontsLoaded] = useFonts({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
});
let [drawerValue, setDrawerValue] = useState(false);
if (!fontsLoaded) {
return <Container style={{ height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Spinner color='blue'/>
</Container>
}
return (
<CustomDrawer value={drawerValue} onClose={() => setDrawerValue(false)}>
<Container>
<Header>
<Left>
<Button transparent onPress={() => setDrawerValue(true)}>
<Icon name='menu'/>
</Button>
</Left>
<Body>
<Title>Header</Title>
</Body>
<Right/>
</Header>
<Content>
<Text>
This is Content Section
</Text>
</Content>
<Footer>
<FooterTab>
<Button full>
<Text>Footer</Text>
</Button>
</FooterTab>
</Footer>
</Container>
</CustomDrawer>
);
{/*<StatusBar style="auto" />*/
}
}