Skip to content

Commit

Permalink
Add previews for JourneyLeg
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Oct 21, 2024
1 parent 0ad7d13 commit d5126f5
Showing 1 changed file with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fun JourneyLeg(
@PreviewLightDark
@Preview(fontScale = 2f)
@Composable
private fun PreviewJourneyLeg() {
private fun PreviewJourneyLegBus() {
KrailTheme {
JourneyLeg(
transportModeLine = TransportModeLine(
Expand All @@ -144,3 +144,38 @@ private fun PreviewJourneyLeg() {
)
}
}


@PreviewLightDark
@Composable
private fun PreviewJourneyLegTrain() {
KrailTheme {
JourneyLeg(
transportModeLine = TransportModeLine(
transportMode = TransportMode.Train(),
lineName = "T2",
),
stopsInfo = "2 stops (1h 10mins)",
departureTime = "8:25am",
stopName = "Central Station",
isWheelchairAccessible = true,
)
}
}

@PreviewLightDark
@Composable
private fun PreviewJourneyLegMetro() {
KrailTheme {
JourneyLeg(
transportModeLine = TransportModeLine(
transportMode = TransportMode.Metro(),
lineName = "M1",
),
stopsInfo = "2 stops (1h 10mins)",
departureTime = "8:25am",
stopName = "Central Station",
isWheelchairAccessible = true,
)
}
}

0 comments on commit d5126f5

Please sign in to comment.