mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-09-20 12:02:49 +02:00
33 lines
836 B
JavaScript
33 lines
836 B
JavaScript
import React from 'react';
|
|
import { PropTypes } from 'prop-types';
|
|
import StopCardHeaderContainer from './StopCardHeaderContainer';
|
|
import withBreakpoint from '../../util/withBreakpoint';
|
|
import { stopShape, stationShape } from '../../util/shapes';
|
|
|
|
function StopPageHeader({ stop, station, breakpoint, isTerminal }) {
|
|
const props = {
|
|
stop: stop || station,
|
|
className: 'stop-page header',
|
|
headingStyle: 'h3',
|
|
icons: [],
|
|
breakpoint,
|
|
isTerminal,
|
|
};
|
|
return <StopCardHeaderContainer {...props} />;
|
|
}
|
|
|
|
StopPageHeader.propTypes = {
|
|
stop: stopShape,
|
|
station: stationShape,
|
|
breakpoint: PropTypes.string,
|
|
isTerminal: PropTypes.bool,
|
|
};
|
|
|
|
StopPageHeader.defaultProps = {
|
|
stop: undefined,
|
|
station: undefined,
|
|
breakpoint: undefined,
|
|
isTerminal: false,
|
|
};
|
|
|
|
export default withBreakpoint(StopPageHeader);
|