-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4875 from HSLdevcom/DT-4910
DT-4910: New texts for infobox
- Loading branch information
Showing
5 changed files
with
220 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import PropTypes from 'prop-types'; | ||
import Icon from './Icon'; | ||
|
||
const FareDisclaimer = ({ textId, values, href = null, linkText = null }) => { | ||
return ( | ||
<div className="disclaimer-container unknown-fare-disclaimer__top"> | ||
<div className="icon-container"> | ||
<Icon className="info" img="icon-icon_info" /> | ||
</div> | ||
<div className="description-container"> | ||
<FormattedMessage id={textId} values={values} /> | ||
|
||
{href && ( | ||
<a href={href}> | ||
<FormattedMessage id={linkText} defaultMessage={linkText} /> | ||
</a> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
FareDisclaimer.propTypes = { | ||
textId: PropTypes.string.isRequired, | ||
values: PropTypes.oneOfType([ | ||
PropTypes.shape({ | ||
agencyName: PropTypes.string, | ||
}), | ||
PropTypes.object, | ||
]), | ||
href: PropTypes.string, | ||
linkText: PropTypes.string, | ||
}; | ||
|
||
FareDisclaimer.defaultProps = { | ||
values: {}, | ||
href: null, | ||
linkText: null, | ||
}; | ||
|
||
export default FareDisclaimer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.