-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.js
More file actions
47 lines (43 loc) · 778 Bytes
/
header.js
File metadata and controls
47 lines (43 loc) · 778 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
44
45
46
47
/* 案例:网易新闻列表展示*/
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
View,
Text,
PixelRatio
} = React;
var Header = React.createClass({
render: function(){
return(
<View style={styles.flex}>
<Text style={styles.font_1}>网易</Text>
<Text style={styles.font_2}>新闻</Text>
<Text>有态度*</Text>
</View>
);
}
});
var styles = StyleSheet.create({
flex: {
marginTop: 25,
height: 50,
borderBottomWidth: 3 / PixelRatio.get(),
borderColor: '#EF2D36',
//flexDirection : 'row',
alignItems: 'center',
},
font: {
fontSize: 25,
fontWeight: 'bold',
textAlign: 'center'
},
font_1: {
color: '#CD1D1C'
},
font_2: {
color: '#FFF',
backgroundColor: '#CD1D1C'
}
});
module.exports = Header;