-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGraphStatBox.js
58 lines (55 loc) · 1.21 KB
/
GraphStatBox.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
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
const GraphStatBox = ({ total, date }) => {
return (
<View style={styles.body}>
<Text style={styles.date}>{date}</Text>
<Text style={styles.text}>{`£${total}`}</Text>
<View style={styles.triangle}/>
<View style={styles.pin}/>
</View>
);
};
const styles = StyleSheet.create({
body: {
position: 'relative',
alignItems: 'center',
justifyContent: 'center',
width: 160,
paddingTop: 12,
paddingBottom: 8,
marginBottom: 10,
backgroundColor: '#fff',
borderRadius: 8
},
text: {
color: '#000',
letterSpacing: 1,
fontWeight: '700',
fontSize: 32
},
date: {
textTransform: 'uppercase',
letterSpacing: 1
},
triangle: {
position: 'absolute',
bottom: -10,
borderTopWidth: 10,
borderRightWidth: 6,
borderBottomWidth: 0,
borderLeftWidth: 6,
borderTopColor: '#fff',
borderRightColor: 'transparent',
borderBottomColor: 'transparent',
borderLeftColor: 'transparent',
},
pin: {
position: 'absolute',
bottom: -190,
height: 180,
width: 0.5,
backgroundColor: '#303030'
}
});
export default GraphStatBox;