Skip to content

Commit

Permalink
Transit alerts: omit colon if no body
Browse files Browse the repository at this point in the history
This makes sure we don't show a colon unless there's both a header and a
body. Addresses part of #258
  • Loading branch information
graue committed Aug 22, 2024
1 parent e6737dd commit 694beb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ItineraryHeader.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
font-weight: bold;
}

.ItineraryHeader_alertHeader::after {
.ItineraryHeader_alertHeader__hasBody::after {
content: ': ';
}

Expand Down
7 changes: 6 additions & 1 deletion src/components/ItineraryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ export default function ItineraryHeader({
</Icon>
{alertHeader && (
<>
<span className="ItineraryHeader_alertHeader">
<span
className={classnames({
ItineraryHeader_alertHeader: true,
ItineraryHeader_alertHeader__hasBody: !!alertBody,
})}
>
{alertHeader}
</span>
<div />
Expand Down

0 comments on commit 694beb4

Please sign in to comment.