mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-11-29 09:01:25 +01:00
| .. | ||
| src | ||
| index.js | ||
| LICENSE-AGPL.txt | ||
| LICENSE-EUPL.txt | ||
| package.json | ||
| README.md | ||
| test.js | ||
@digitransit-component/digitransit-component-icon
Icon
Icon renders predefined Svg icons as react component.
Parameters
$0Object$0.color$0.img$0.height$0.width$0.rotate
Examples
<Icon
img="bus" // Key of svg, required
height={1} // Height as em, optional
width={1} // Width as em, optional
color="#007ac9" // Color of image, optional
rotate={90} // How many degrees to rotate image, optional
/>
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-icon
Or install the digitransit-component module that includes it as a class:
$ npm install @digitransit-component/digitransit-component