Skip to content

Commit afc76de

Browse files
authored
Merge pull request #1173 from StoDevX/whitelist-listrow
Whitelist ListRow's props
2 parents 170c46c + 63408ba commit afc76de

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

source/views/building-hours/row.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function BuildingRow({info, name, now, onPress}: PropsType) {
6666
const textaccent = foregroundColors[openStatus] || 'rgb(130, 82, 45)'
6767

6868
return (
69-
<ListRow onPress={onPress} arrowPosition="center" direction="column">
69+
<ListRow onPress={onPress} arrowPosition="center">
7070
<Column>
7171
<Row style={styles.title}>
7272
<Title lines={1} style={styles.titleText}>

source/views/components/list/list-row.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const styles = StyleSheet.create({
3434
},
3535
})
3636

37-
type PropsType = {
37+
type PropsType = {|
3838
style?: any,
3939
contentContainerStyle?: any,
4040
arrowPosition?: 'center' | 'top' | 'none',
@@ -43,7 +43,7 @@ type PropsType = {
4343
spacing?: {left?: number, right?: number},
4444
onPress?: () => any,
4545
children?: any,
46-
}
46+
|}
4747
export function ListRow(props: PropsType) {
4848
const {
4949
style,

source/views/transportation/bus/bus-line.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import React from 'react'
3-
import {View, StyleSheet, Platform} from 'react-native'
3+
import {View, StyleSheet, Platform, Text} from 'react-native'
44
import type {BusLineType, FancyBusTimeListType} from './types'
55
import {getScheduleForNow, getSetOfStopsForNow} from './lib'
66
import get from 'lodash/get'
@@ -11,8 +11,7 @@ import moment from 'moment-timezone'
1111
import * as c from '../../components/colors'
1212
import {Separator} from '../../components/separator'
1313
import {BusStopRow} from './bus-stop-row'
14-
import {ListRow} from '../../components/list'
15-
import {ListSectionHeader} from '../../components/list'
14+
import {ListRow, ListSectionHeader, Title} from '../../components/list'
1615

1716
const TIME_FORMAT = 'h:mma'
1817
const TIMEZONE = 'America/Winnipeg'
@@ -61,7 +60,9 @@ export function BusLine({line, now}: {line: BusLineType, now: moment}) {
6160
return (
6261
<View>
6362
<ListSectionHeader title={line.line} titleStyle={androidColor} />
64-
<ListRow title="This line is not running today." />
63+
<ListRow>
64+
<Title><Text>This line is not running today.</Text></Title>
65+
</ListRow>
6566
</View>
6667
)
6768
}

0 commit comments

Comments
 (0)