-
Notifications
You must be signed in to change notification settings - Fork 0
/
TabBarItem.js
47 lines (43 loc) · 937 Bytes
/
TabBarItem.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
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableHighlight,
TouchableOpacity
} from 'react-native';
export default class TabBarItem extends Component {
render() {
return (
<View style={styles.container}>
<TouchableHighlight onPress={this.props.onClick} underlayColor='#dddddd'>
<View style={styles.content}>
<Image source={this.props.img} style={styles.img} />
<Text style={styles.text}>
{this.props.text}
</Text>
</View>
</TouchableHighlight>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5FCFF',
},
content: {
alignItems: 'center'
},
img: {
width: 30,
height: 30,
marginTop: 10
},
text: {
marginTop: 5,
marginBottom: 10
}
});