...
|
...
|
@@ -22,7 +22,8 @@ export default class SectionHeader extends React.Component { |
|
|
static propTypes = {
|
|
|
data: ImmutablePropTypes.contains({
|
|
|
uri: React.PropTypes.string.isRequired,
|
|
|
title: React.PropTypes.string.isRequired,
|
|
|
title: React.PropTypes.string,
|
|
|
desc: React.PropTypes.string.isRequired,
|
|
|
post: React.PropTypes.string.isRequired,
|
|
|
comment: React.PropTypes.string.isRequired,
|
|
|
like: React.PropTypes.string.isRequired,
|
...
|
...
|
@@ -35,11 +36,11 @@ export default class SectionHeader extends React.Component { |
|
|
}
|
|
|
|
|
|
render() {
|
|
|
let {uri, title, post, comment, like} = this.props.data.toJS();
|
|
|
let {uri, desc, post, comment, like} = this.props.data.toJS();
|
|
|
return (
|
|
|
<Image style={[styles.container, this.props.style]} source={{uri}} resizeMode={'cover'}>
|
|
|
<Text style={styles.title}>{title}</Text>
|
|
|
<View style={styles.desc}>
|
|
|
<Text style={styles.desc}>{desc}</Text>
|
|
|
<View style={styles.stats}>
|
|
|
<Text style={[styles.content, {flex: 0.3}]} numberOfLines={1}>{post}</Text>
|
|
|
<Text style={styles.content}>|</Text>
|
|
|
<Text style={[styles.content, {flex: 0.3}]} numberOfLines={1}>{comment}</Text>
|
...
|
...
|
@@ -58,7 +59,7 @@ let styles = StyleSheet.create({ |
|
|
// alignItems: 'center',
|
|
|
backgroundColor: '#b0b0b0',
|
|
|
},
|
|
|
title: {
|
|
|
desc: {
|
|
|
color: 'white',
|
|
|
// fontFamily: 'SourceHanSansCN Normal',
|
|
|
fontSize: 24,
|
...
|
...
|
@@ -66,7 +67,7 @@ let styles = StyleSheet.create({ |
|
|
textAlign: 'center',
|
|
|
backgroundColor: 'transparent',
|
|
|
},
|
|
|
desc: {
|
|
|
stats: {
|
|
|
flex: 1,
|
|
|
flexDirection: 'row',
|
|
|
justifyContent: 'space-between',
|
...
|
...
|
|