@dnanpm/icons
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

DNA Icons repository provides the set of icons used in various DNA projects. Icons are fetched directly from Figma, processed and published to NPM.

Installation

Run install command in repository where DNA Icons should be added

npm install @dnanpm/icons

Usage example

React component

Standalone

import { Warning } from '@dnanpm/icons';

const MyComponent = () => {
    return (
        <Warning />
    );
};

export default MyComponent;

With Styleguide Icon wrapper

import { Warning } from '@dnanpm/icons';
import { Icon } from '@dnanpm/styleguide';

const MyComponent = () => {
    return (
        <Icon icon={Warning} />
    );
};

export default MyComponent;

SVG Sprite

Asset

import '@dnanpm/icons/sprite';

Javascript string

import sprite from '@dnanpm/icons/spriteJs';

const parser = new DOMParser();
console.log(parser.parseFromString(sprite, "image/svg+xml"));

Readme

Keywords

Package Sidebar

Install

npm i @dnanpm/icons

Weekly Downloads

841

Version

2.0.1

License

ISC

Unpacked Size

1.31 MB

Total Files

689

Last publish

Collaborators

  • chetalipatidar
  • stanislav.majlath