Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions lib/components/viewers/route-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,42 +113,44 @@ const StyledRouteRow = styled.div`
`

const RouteRowButton = styled(Button)`
padding: 8px;
align-items: center;
display: flex;
padding: 6px;
width: 100%;
`

const RouteRowElement = styled.div`
display: inline-block;
vertical-align: middle;
const RouteRowElement = styled.span`
`

const OperatorImg = styled.img`
height: 25px;
margin-right: 8px;
`

const ModeIconElement = styled(RouteRowElement)`
const ModeIconElement = styled.span`
display: inline-block;
vertical-align: bottom;
height: 22px;
`

const RouteNameElement = styled(RouteRowElement)`
margin-top: 2px;
`

const StyledLabel = styled(Label)`
const RouteNameElement = styled(Label)`
background-color: ${props => (
props.backgroundColor === '#ffffff'
props.backgroundColor === '#ffffff' || props.backgroundColor === 'white'
? 'rgba(0,0,0,0)'
: props.backgroundColor
)};
color: ${props => props.color};
flex: 0 1 auto;
font-size: medium;
font-weight: 400;
margin-left: ${props => (
props.backgroundColor === '#ffffff' || props.backgroundColor === 'white'
? 0
: '8px'
)};
font-size: medium;
font-weight: 400;
margin-top: 2px;
overflow: hidden;
text-overflow: ellipsis;
`

const RouteDetails = styled.div`
Expand Down Expand Up @@ -217,10 +219,12 @@ class RouteRow extends PureComponent {
<ModeIconElement>
<ModeIcon height={22} mode={getModeFromRoute(route)} width={22} />
</ModeIconElement>
<RouteNameElement>
<StyledLabel backgroundColor={backgroundColor} color={color}>
<b>{route.shortName}</b> {longName}
</StyledLabel>
<RouteNameElement
backgroundColor={backgroundColor}
color={color}
title={`${route.shortName} ${longName}`}
>
<b>{route.shortName}</b> {longName}
</RouteNameElement>
</RouteRowButton>
<VelocityTransitionGroup enter={{animation: 'slideDown'}} leave={{animation: 'slideUp'}}>
Expand Down
3 changes: 3 additions & 0 deletions lib/components/viewers/viewers.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
}

.otp .route-viewer-body, .otp .stop-viewer-body, .otp .trip-viewer-body {
overflow-x: hidden;
overflow-y: auto;
}
.otp .stop-viewer-body, .otp .trip-viewer-body {
padding: 12px;
}

Expand Down