drawer basic done and avatar in navbar
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
+42
-15
@@ -6,34 +6,47 @@ import {
|
|||||||
Dimensions,
|
Dimensions,
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
Image
|
ImageBackground
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import {
|
import {
|
||||||
Actions
|
Actions
|
||||||
} from 'react-native-router-flux';
|
} from 'react-native-router-flux';
|
||||||
|
import Icon from 'react-native-vector-icons/MaterialIcons';
|
||||||
|
|
||||||
const windowWidth = Dimensions.get('window').width;
|
const windowWidth = Dimensions.get('window').width;
|
||||||
const windowHeight = Dimensions.get('window').height;
|
const windowHeight = Dimensions.get('window').height;
|
||||||
|
|
||||||
const remote = 'http://www.frugalsoft.com/images/nice-cute-wallpaper-designs-cute-iphone-wallpaper-patterns';
|
const backgroundLink = '../../assets/images/homeBg.jpg';
|
||||||
|
|
||||||
type Props = {};
|
type Props = {};
|
||||||
export default class Menu extends Component<Props> {
|
export default class Menu extends Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.header}>
|
<ImageBackground style={styles.header} source={require(backgroundLink)} >
|
||||||
<Text>Arjun Patel</Text>
|
<Text style={styles.hdrTxt}>Menu</Text>
|
||||||
</View>
|
</ImageBackground>
|
||||||
<View style={styles.main}>
|
<View style={styles.main}>
|
||||||
<View style={styles.option}>
|
<View style={styles.option}>
|
||||||
<Text>Refresh Connection</Text>
|
<Text style={styles.optTxt}>Refresh Connection</Text>
|
||||||
|
<Icon
|
||||||
|
name='track-changes'
|
||||||
|
style={styles.icons}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.option}>
|
<View style={styles.option}>
|
||||||
<Text>Change Avatar</Text>
|
<Text style={styles.optTxt}>Change Avatar</Text>
|
||||||
|
<Icon
|
||||||
|
name='refresh'
|
||||||
|
style={styles.icons}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.option}>
|
<View style={styles.option}>
|
||||||
<Text>Disconnect</Text>
|
<Text style={styles.optTxt}>Disconnect</Text>
|
||||||
|
<Icon
|
||||||
|
name='exit-to-app'
|
||||||
|
style={styles.icons}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -43,26 +56,40 @@ export default class Menu extends Component<Props> {
|
|||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
container: {
|
container: {
|
||||||
flex: 4,
|
flex: 13,
|
||||||
backgroundColor: 'white'
|
backgroundColor: 'white'
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
flex: 1,
|
flex: 3,
|
||||||
backgroundColor: 'grey',
|
backgroundColor: 'grey',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
},
|
},
|
||||||
|
hdrTxt: {
|
||||||
|
color: '#0e8f9e',
|
||||||
|
fontSize: 30
|
||||||
|
},
|
||||||
main: {
|
main: {
|
||||||
flex: 3,
|
flex: 10,
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
},
|
},
|
||||||
option: {
|
option: {
|
||||||
height: 10,
|
flex: 0,
|
||||||
paddingTop: 20,
|
flexBasis: 3,
|
||||||
paddingBottom: 20,
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
|
padding: 30,
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderColor: '#d7d9dd'
|
borderColor: '#d7d9dd'
|
||||||
}
|
},
|
||||||
|
icons: {
|
||||||
|
fontSize: 30,
|
||||||
|
color: '#0e8f9e'
|
||||||
|
},
|
||||||
|
optTxt: {
|
||||||
|
fontSize: 20
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,10 +33,7 @@ export default class Navbar extends Component<Props> {
|
|||||||
<Text style={styles.status}>online</Text>
|
<Text style={styles.status}>online</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.iconCont}>
|
<View style={styles.iconCont}>
|
||||||
<Icon
|
<Image source={require('../../assets/images/patterns/1.jpg')} style={styles.avatar} />
|
||||||
name='inbox'
|
|
||||||
style={styles.inboxIcon}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@@ -74,8 +71,9 @@ const styles = {
|
|||||||
color: 'white',
|
color: 'white',
|
||||||
fontFamily: Fonts.Sunflower
|
fontFamily: Fonts.Sunflower
|
||||||
},
|
},
|
||||||
inboxIcon: {
|
avatar: {
|
||||||
fontSize: 25,
|
height: 30,
|
||||||
color: 'white'
|
width: 30,
|
||||||
|
borderRadius: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user