-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnavigator.js
108 lines (93 loc) · 3.03 KB
/
navigator.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import React from "react";
import { StyleSheet, Text, View, ScrollView, Image } from "react-native";
import QuestionsScreen from "./screens/question";
//import AnswersScreen from './screens/answer'
import ProfileScreen from "./screens/profile";
import {
createStackNavigator,
createAppContainer,
createDrawerNavigator
} from "react-navigation";4
import { Header, Card, Icon, SearchBar, Button, Divider, } from "react-native-elements";
import { TouchableOpacity } from "react-native-gesture-handler";
import Emoji from 'react-native-emoji';
class SideMenu extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={styles.ImageIN}>
<Image source={require("./assets/icon.png")} />
</View>
<View style={styles.innerContainer}>
<ScrollView>
<Divider style={{ backgroundColor: 'black' }} />
<TouchableOpacity
onPress={() => this.props.navigation.navigate('Questions')}
>
<Text
style={styles.item}>
Questions
</Text>
</TouchableOpacity>
<Divider style={{ backgroundColor: 'black' }} />
<TouchableOpacity
onPress={() => this.props.navigation.navigate('Profile')}
>
<Text
style={styles.item}>
About Me
</Text>
</TouchableOpacity>
<Divider style={{ backgroundColor: 'black' }} />
</ScrollView>
</View>
<View style={{paddingTop:10,backgroundColor:"#12d3cf",}}>
<Text
style={{
fontWeight:"bold",
textAlign:"center",
marginBottom:20,
}}>
Made by Spandan Pal <Emoji name="smiley" style={{fontSize: 20}} />
</Text>
</View>
</View>
);
}
}
export const Navigator = createDrawerNavigator(
{
Questions: { screen: QuestionsScreen },
Profile: { screen: ProfileScreen }
},
{
drawerBackgroundColor: "#b0f4e6",
contentComponent: SideMenu
}
);
const Nav=createAppContainer(Navigator)
export default Nav;
const styles=StyleSheet.create({
item:{
color:"black",
marginTop:20,
marginBottom:20,
marginLeft:20,
fontWeight:"bold",
},
container:{
flex:1,
marginTop:50,
},
innerContainer:{
flex:1,
},
ImageIN:{
flex:0.5,
marginLeft:35,
width:100,
height:100,
marginBottom:30,
marginTop:10,
}
})