Skip to content

Commit

Permalink
fix(Itinerary): render text as div (#3643)
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Nov 15, 2022
1 parent f12bbab commit fd5dd46
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -98,6 +98,7 @@ const ItinerarySegmentStop = ({
{time && (
<Text
weight="medium"
as="div"
type={cancelledTime ? textType : "primary"}
withBackground={!!cancelledTime}
>
Expand All @@ -109,18 +110,19 @@ const ItinerarySegmentStop = ({
type={cancelledDate ? textType : "secondary"}
size="small"
align="right"
as="div"
withBackground={!!cancelledDate}
>
{date}
</Text>
)}
{cancelledTime && (
<Text type="secondary" weight="medium" strikeThrough>
<Text type="secondary" weight="medium" strikeThrough as="div">
{cancelledTime}
</Text>
)}
{cancelledDate && (
<Text type="secondary" size="small" align="right" strikeThrough>
<Text type="secondary" size="small" align="right" strikeThrough as="div">
{cancelledDate}
</Text>
)}
Expand All @@ -137,26 +139,28 @@ const ItinerarySegmentStop = ({
<Stack direction="column" shrink spacing="none">
{hidden && hiddenCityText && <StyledHiddenCity>{hiddenCityText}</StyledHiddenCity>}
<Text
as="div"
weight="medium"
withBackground={!!cancelledCity}
type={cancelledCity ? textType : "primary"}
>
{city}
</Text>
<Text
as="div"
size="small"
type={cancelledStation ? textType : "secondary"}
withBackground={!!cancelledStation}
>
{station}
</Text>
{cancelledCity && (
<Text weight="medium" strikeThrough>
<Text weight="medium" strikeThrough as="div">
{cancelledCity}
</Text>
)}
{cancelledStation && (
<Text type="secondary" size="small" strikeThrough>
<Text type="secondary" size="small" strikeThrough as="div">
{cancelledStation}
</Text>
)}
Expand Down

0 comments on commit fd5dd46

Please sign in to comment.