@dnanpm/icons
Version:
DNA Icons repository provides the set of icons used in various DNA projects. Icons are fetched directly from Figma, processed and published to NPM.
60 lines (40 loc) • 969 B
Markdown
DNA Icons repository provides the set of icons used in various DNA projects. Icons are fetched directly from Figma, processed and published to NPM.
Run install command in repository where DNA Icons should be added
```shell
npm install @dnanpm/icons
```
```js
import { Warning } from '@dnanpm/icons';
const MyComponent = () => {
return (
<Warning />
);
};
export default MyComponent;
```
```js
import { Warning } from '@dnanpm/icons';
import { Icon } from '@dnanpm/styleguide';
const MyComponent = () => {
return (
<Icon icon={Warning} />
);
};
export default MyComponent;
```
```js
import '@dnanpm/icons/sprite';
```
```js
import sprite from '@dnanpm/icons/spriteJs';
const parser = new DOMParser();
console.log(parser.parseFromString(sprite, "image/svg+xml"));
```