digitransit-ui/app/component/itinerary/ItineraryNotification.js
Vesa Meskanen 3f2fa2ae0b feat: move all itinerary page related components to a dedicated folder
Also:
- Move generic Toggle to componentfolder root
- Remove dead styles
- Refactor some componets
2024-04-22 08:49:15 +03:00

28 lines
774 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Icon from '../Icon';
export default function ItineraryNotification({ headerId, bodyId, iconId }) {
return (
<div className="itinerary-notification">
<div className="left-block">{iconId && <Icon img={iconId} />}</div>
<div className="right-block">
<h3>{headerId && <FormattedMessage id={headerId} />}</h3>
<p>{bodyId && <FormattedMessage id={bodyId} />}</p>
</div>
</div>
);
}
ItineraryNotification.propTypes = {
headerId: PropTypes.string,
bodyId: PropTypes.string,
iconId: PropTypes.string,
};
ItineraryNotification.defaultProps = {
headerId: undefined,
bodyId: undefined,
iconId: undefined,
};