-
Notifications
You must be signed in to change notification settings - Fork 0
/
Trip.js
112 lines (97 loc) · 2.65 KB
/
Trip.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
'use strict';
var React = require('react-native');
var {
Image,
StyleSheet,
Text,
View,
Component,
ListView,
TouchableHighlight,
ActivityIndicatorIOS
} = React;
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'white',
},
thumbnail: {
width: 10,
height: 80,
marginRight: 10,
},
rightContainer: {
flex:1,
justifyContent: 'center',
flexDirection: 'column',
alignItems: 'center',
marginLeft:10
},
title: {
fontSize: 20,
marginBottom: 8
},
author: {
color: '#656565'
},
separator: {
height: 1,
backgroundColor: '#dddddd'
},
calendar:{
backgroundColor:'rgba(1, 10, 15, 0.79)',
borderRadius:4,
padding:2,
marginLeft:10,
justifyContent: 'center',
alignItems: 'center',
},
calendarDate:{
color:'white',
fontSize:10
},
tripIcon:{
width:24,
height:24,
},
invoiceContainer:{
marginRight:10,
}
});
class Trip extends Component {
render() {
return (
<TouchableHighlight underlayColor='#dddddd'>
<View>
<View style={styles.container}>
<View style={[styles.thumbnail,{
backgroundColor:this.props.color
}]}>
</View>
<View style={styles.calendar}>
<Text style={styles.calendarDate}>13</Text>
<Text style={styles.calendarDate}>May'15</Text>
</View>
<View style={styles.rightContainer}>
<Text style={styles.author}>{this.props.start}</Text>
<Image
source={ require('image!trip') }
style={[styles.tripIcon]} />
<Text style={styles.author}>{this.props.end}</Text>
</View>
<View style={styles.invoiceContainer}>
<View style={styles.amountContainer}>
<Text style={styles.author}>$200.00</Text>
</View>
</View>
</View>
<View style={styles.separator} />
</View>
</TouchableHighlight>
);
}
}
module.exports = Trip;