-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitemSquare.js
66 lines (58 loc) · 1.15 KB
/
itemSquare.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
/**
* Created by zhanjiyuan on 15/11/7.
*/
'use strict';
var React = require('react-native');
var {
StyleSheet,
Text,
View,
} = React;
var Seperator = React.createClass({
render: function() {
return (
<View style={styles.rowSeparator}/>
);
}
});
var ItemSquare = React.createClass({
render: function() {
return (
<View>
<Seperator/>
<View style={styles.container}>
<Text style={styles.name} numberOfLines = {1}>{this.props.data.name}</Text>
<Text style={styles.description} numberOfLines = {1}>{this.props.data.description}</Text>
</View>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flexDirection: 'row',
height: 60,
alignItems: 'center',
backgroundColor: 'white',
},
name: {
flex: 1,
fontSize: 20,
color: '#000000',
fontWeight: 'bold',
paddingLeft: 20,
paddingRight: 10,
},
description: {
flex: 3,
fontSize: 15,
color: '#000000',
paddingRight: 10,
},
rowSeparator: {
backgroundColor: 'rgba(0, 0, 0, 0.1)',
height: 1,
marginLeft: 4,
},
});
module.exports = ItemSquare;