-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathClusterMaker.js
62 lines (58 loc) · 1.4 KB
/
ClusterMaker.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
import React, {PropTypes} from 'react';
import {
StyleSheet,
View,
Text,
} from 'react-native';
const ClusterMarker = ({count}) => {
return (
<View style={styles.container}>
<View style={styles.bubble}>
<Text style={styles.count}>{count}</Text>
</View>
<View style={styles.arrowBorder}/>
<View style={styles.arrow}/>
</View>
);
};
ClusterMarker.propTypes = {
count: PropTypes.number.isRequired,
};
export default ClusterMarker;
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
alignSelf: 'flex-start',
},
bubble: {
flex: 0,
flexDirection: 'row',
alignSelf: 'flex-start',
backgroundColor: '#217ab9',
paddingHorizontal: 10,
paddingVertical: 6,
borderRadius: 3,
borderColor: '#FFFFFF',
borderWidth: 0.5,
},
count: {
color: '#FFFFFF',
fontSize: 13,
},
arrow: {
backgroundColor: 'transparent',
borderWidth: 4,
borderColor: 'transparent',
borderTopColor: '#217ab9',
alignSelf: 'center',
marginTop: -9,
},
arrowBorder: {
backgroundColor: 'transparent',
borderWidth: 4,
borderColor: 'transparent',
borderTopColor: '#FFFFFF',
alignSelf: 'center',
marginTop: -0.5,
},
});