Skip to content

Commit 17897cc

Browse files
committed
add arrows to news rows
1 parent 215f718 commit 17897cc

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

views/news/news-container.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313

1414
import delay from 'delay'
1515

16+
import Icon from 'react-native-vector-icons/Ionicons'
1617
import type {StoryType} from './types'
1718
import LoadingView from '../components/loading'
1819
import * as c from '../components/colors'
@@ -73,9 +74,12 @@ export default class NewsContainer extends React.Component {
7374
let snippet = entities.decode(story.contentSnippet)
7475
return (
7576
<TouchableHighlight underlayColor={'#ebebeb'} onPress={() => this.onPressNews(title, story)}>
76-
<View style={styles.rowContainer}>
77-
<Text style={styles.itemTitle} numberOfLines={1}>{title}</Text>
78-
<Text style={styles.itemPreview} numberOfLines={2}>{snippet}</Text>
77+
<View style={[styles.row]}>
78+
<View style={[styles.rowContainer]}>
79+
<Text style={styles.itemTitle} numberOfLines={1}>{title}</Text>
80+
<Text style={styles.itemPreview} numberOfLines={2}>{snippet}</Text>
81+
</View>
82+
<Icon style={[styles.arrowIcon]} name='ios-arrow-forward' />
7983
</View>
8084
</TouchableHighlight>
8185
)
@@ -119,26 +123,35 @@ const styles = StyleSheet.create({
119123
paddingBottom: 50,
120124
backgroundColor: '#ffffff',
121125
},
122-
rowContainer: {
123-
marginLeft: 10,
126+
row: {
127+
flexDirection: 'row',
128+
alignItems: 'flex-start',
129+
borderBottomWidth: 1,
130+
borderBottomColor: '#ebebeb',
131+
marginLeft: 20,
124132
paddingRight: 10,
125133
paddingTop: 8,
126134
paddingBottom: 8,
127-
borderBottomWidth: 1,
128-
borderBottomColor: '#ebebeb',
135+
},
136+
arrowIcon: {
137+
color: c.iosText,
138+
fontSize: 20,
139+
marginRight: 6,
140+
marginLeft: 6,
141+
marginTop: 0,
142+
},
143+
rowContainer: {
144+
flexDirection: 'column',
145+
flex: 1,
129146
},
130147
itemTitle: {
131148
color: c.black,
132-
paddingLeft: 10,
133-
paddingRight: 10,
134149
paddingBottom: 3,
135150
fontSize: 16,
136151
textAlign: 'left',
137152
},
138153
itemPreview: {
139154
color: c.iosText,
140-
paddingLeft: 10,
141-
paddingRight: 10,
142155
fontSize: 13,
143156
textAlign: 'left',
144157
},

0 commit comments

Comments
 (0)