Skip to content

Commit

Permalink
add duration
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Aug 7, 2024
1 parent 1f2f478 commit 30275f8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/components/map/itinerary-summary-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
getVisibleItineraryIndex
} from '../../util/state'
import { isDefined } from '../../util/ui'
import FormattedDuration from '../util/formatted-duration'
import MetroItineraryRoutes from '../narrative/metro/metro-itinerary-routes'

type ItinWithGeometry = Itinerary & {
Expand All @@ -37,6 +38,18 @@ type Props = {
visibleItinerary?: number
}

const TimeWrapper = styled.span`
align-items: center;
background: black;
border-radius: 5px;
color: white;
display: inline-flex;
font-weight: 600;
justify-content: center;
margin-left: 8px;
padding: 0px 8px;
`

const Card = styled.div`
${boxShadowCss}
Expand Down Expand Up @@ -189,6 +202,9 @@ const ItinerarySummaryOverlay = ({
itinerary={mp.itin}
LegIcon={LegIcon}
/>
<TimeWrapper>
<FormattedDuration duration={mp.itin.duration} />
</TimeWrapper>
</Card>
</Marker>
)
Expand Down

0 comments on commit 30275f8

Please sign in to comment.