digitransit-ui/digitransit-component/packages/digitransit-component-traffic-now-link/README.md

51 lines
1.4 KiB
Markdown

# DEPRECATED
The component is no longer maintained or updated and is currently pending deletion from the project
## @digitransit-component/digitransit-component-traffic-now-link
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### 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
```javascript
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 file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the digitransit-component project. -->
---
This module is part of the Digitransit-ui project. It is maintained in the
[HSLdevcom/digitransit-ui](https://github.com/HSLdevcom/digitransit-ui) repository, where you can create
PRs and issues.
#### Installation
Install this module individually:
```sh
$ npm install @digitransit-component/digitransit-component-traffic-now-link
```
Or install the digitransit-component module that includes it as a class:
```sh
$ npm install @digitransit-component/digitransit-component
```