-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomSidebarMenu.js
More file actions
47 lines (35 loc) · 1.16 KB
/
Copy pathCustomSidebarMenu.js
File metadata and controls
47 lines (35 loc) · 1.16 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
import React from 'react';
import { Button, View, Text, SafeAreaView, ScrollView,
TouchableOpacity, ImageBackground } from 'react-native';
import { DrawerContentScrollView, DrawerItemList,
DrawerItem } from '@react-navigation/drawer';
import styles from './style';
import {Fontisto} from '@expo/vector-icons'
/*
const NavigationDrawerStructure = (props) => {
const toggleDrawer = () => {
props.navigationProps.closeDrawer();
};
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={toggleDrawer}>
<Fontisto style={styles.sidebar} name="nav-icon-a" size={28} />
</TouchableOpacity>
</View>
);
};
<NavigationDrawerStructure navigationProps={navigation} />
*/
const CustomSidebarMenu = (props) => {
return (
<SafeAreaView style={{ flex: 1 }}>
<TouchableOpacity onPress={() => props.navigation.closeDrawer()}>
<Fontisto style={styles.sidebar} name="nav-icon-a" size={28} />
</TouchableOpacity>
<DrawerContentScrollView {...props}>
<DrawerItemList {...props} />
</DrawerContentScrollView>
</SafeAreaView>
);
};
export default CustomSidebarMenu;