Skip to content

Commit

Permalink
Add emojis to train status
Browse files Browse the repository at this point in the history
* Add emojis to train status
* Add bold to "TBD"
* See #18
  • Loading branch information
axelclark committed Jun 16, 2018
1 parent fb2ff2a commit 3096a56
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 25 deletions.
11 changes: 8 additions & 3 deletions components/TrainList.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ const Destination = ({ destinationName, line, cars }) => (
const Arrival = ({ mins }) => {
switch (mins) {
case 'BRD':
return <Text style={[[styles.text], [styles.bold]]}>Boarding!</Text>
return <Text style={styles.text}>🚈 Boarding!</Text>
case 'ARR':
return <Text style={styles.text}>Train is arriving...</Text>
return <Text style={styles.text}>🚊 Train is arriving...</Text>
case '':
return <Text style={styles.text}>TBD minutes</Text>
return (
<Text>
<Text style={[[styles.text], [styles.bold]]}>TBD </Text>
<Text style={styles.text}>minutes</Text>
</Text>
)
case '1':
return (
<Text>
Expand Down
63 changes: 41 additions & 22 deletions components/__tests__/__snapshots__/TrainList.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,13 @@ exports[`renders correctly 1`] = `
allowFontScaling={true}
ellipsizeMode="tail"
style={
Array [
Array [
Object {
"color": "#171f3d",
"fontSize": 18,
},
],
Array [
Object {
"fontWeight": "bold",
},
],
]
Object {
"color": "#171f3d",
"fontSize": 18,
}
}
>
Boarding!
🚈 Boarding!
</Text>
</View>
<View
Expand Down Expand Up @@ -130,7 +121,7 @@ exports[`renders correctly 1`] = `
}
}
>
Train is arriving...
🚊 Train is arriving...
</Text>
</View>
<View
Expand Down Expand Up @@ -274,14 +265,42 @@ exports[`renders correctly 1`] = `
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"color": "#171f3d",
"fontSize": 18,
}
}
>
TBD minutes
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Array [
Array [
Object {
"color": "#171f3d",
"fontSize": 18,
},
],
Array [
Object {
"fontWeight": "bold",
},
],
]
}
>
TBD
</Text>
<Text
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"color": "#171f3d",
"fontSize": 18,
}
}
>
minutes
</Text>
</Text>
</View>
</View>
Expand Down

0 comments on commit 3096a56

Please sign in to comment.