Skip to content

Commit a063f17

Browse files
committed
bus: Declare barColor and currentStopColor as of ColorValue type
Signed-off-by: Kristofer Rye <[email protected]>
1 parent f892f85 commit a063f17

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

source/views/transportation/bus/components/bus-stop-row.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import {Platform, StyleSheet} from 'react-native'
2+
import {ColorValue, Platform, StyleSheet} from 'react-native'
33
import {Column} from '@frogpond/layout'
44
import {Detail, ListRow, Title} from '@frogpond/lists'
55
import type {BusTimetableEntry} from '../types'
@@ -36,8 +36,8 @@ type Props = {
3636
stop: BusTimetableEntry
3737
departureIndex: null | number
3838
now: Moment
39-
barColor: string
40-
currentStopColor: string
39+
barColor: ColorValue
40+
currentStopColor: ColorValue
4141
isFirstRow: boolean
4242
isLastRow: boolean
4343
status: BusStateEnum

source/views/transportation/bus/components/progress-chunk.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import * as c from '@frogpond/colors'
3-
import {Platform, StyleSheet, View} from 'react-native'
3+
import {ColorValue, Platform, StyleSheet, View} from 'react-native'
44
import type {BusStopStatusEnum} from '../lib'
55

66
const isAndroid = Platform.OS === 'android'
@@ -47,8 +47,8 @@ const styles = StyleSheet.create({
4747
})
4848

4949
type Props = {
50-
barColor: string
51-
currentStopColor: string
50+
barColor: ColorValue
51+
currentStopColor: ColorValue
5252
isFirstChunk: boolean
5353
isLastChunk: boolean
5454
stopStatus: BusStopStatusEnum

source/views/transportation/bus/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type {Moment} from 'moment'
2+
import {ColorValue} from 'react-native'
23

34
export type DayOfWeek = 'Su' | 'Mo' | 'Tu' | 'We' | 'Th' | 'Fr' | 'Sa'
45
export type Coordinates = [number, number]
56

67
export type BusLineColors = {
7-
bar: string
8-
dot: string
8+
bar: ColorValue
9+
dot: ColorValue
910
}
1011

1112
export type UnprocessedDepartureTimeList = Array<string | false>

0 commit comments

Comments
 (0)