forked from territoryfan/react-native-tabbar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabBarCenter.js
More file actions
44 lines (43 loc) · 982 Bytes
/
Copy pathTabBarCenter.js
File metadata and controls
44 lines (43 loc) · 982 Bytes
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
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View,
Dimensions
} from 'react-native';
export default class TabBarCenter extends Component {
render() {
const style = this.props.setBtn ==0 ? styles.centerView : styles.centerViewBtn;
return (
<View style={[style,styles.eqView]}>
<Text style={styles.centerViewText}>+</Text>
</View>
);
}
}
const styles = StyleSheet.create({
eqView: {
width: 50,
height:50,
justifyContent: "center",
alignItems: "center",
backgroundColor:"rgb(148, 148, 148)",
borderRadius:80,
},
centerView: {
position: "absolute",
left: Dimensions.get('window').width/2,
bottom:15,
right:0,
marginLeft:-25,
},
centerViewBtn: {
position: "absolute",
bottom:15,
},
centerViewText: {
color: "#fff",
fontSize: 34,
},
});