digitransit-ui/digitransit-component/packages/digitransit-component-traffic-now-link
2025-05-21 18:37:05 +03:00
..
src Add Polish translation 2024-06-24 12:12:27 +02:00
index.js chore: in NODE_ENV=development, use dev bundles with included inline sourcemaps 2022-05-20 14:15:30 +03:00
LICENSE-AGPL.txt feat: traffic now Link to control panel 2020-06-04 08:26:56 +03:00
LICENSE-EUPL.txt feat: traffic now Link to control panel 2020-06-04 08:26:56 +03:00
package.json chore: update i18next to latest versionb which works without esm6 2025-05-21 18:37:05 +03:00
README.md chore: bump traffic now link version 2020-11-04 09:43:53 +02:00
test.js feat: update folder structure, webpack and add watch script 2020-08-20 09:52:52 +03:00

@digitransit-component/digitransit-component-traffic-now-link

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