@digitransit-component/digitransit-component-traffic-now-link
v1.0.2
Published
digitransit-component traffic-now-link module
Downloads
29
Maintainers
Readme
@digitransit-component/digitransit-component-traffic-now-link
TrafficNowLink
Extends React.Component
A banner with blue caution Icon and arrow mark, original purpose is to act as a link to a page about current traffic information.
Examples
handleClick = (e, lang) => {
e.preventDefault();
window.location = 'www.digitransit.fi';
};
const lang = "fi"
<TrafficNowLink lang={lang} handleClick={this.handleClick}/>
handleClick
Required. Function to handle when the banner is clicked. Also for KeyDown events
This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.
Installation
Install this module individually:
$ npm install @digitransit-component/digitransit-component-traffic-now-link
Or install the digitransit-component module that includes it as a class:
$ npm install @digitransit-component/digitransit-component