1.14.0 • Published 5 years ago

react-undraw-auto v1.14.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

NPM Version Build Status Dependency Status Dev Dependency Status

React unDraw

React component for unDraw illustrations.

Demo

https://justinlettau.github.io/react-undraw

Installation

npm install react-undraw --save

Usage

Import everything:

import Undraw from 'react-undraw';

<Undraw name="coding" />;

Import only what you need:

import { UndrawCoding } from 'react-undraw';

<UndrawCoding />;

Props:

PropTypeDescriptionDefault
namestringIllustration name, kebab-case.n/a
primaryColorstringIllustration primary color.#6c63ff
heightstringIllustration height.250px

See ILLUSTRATIONS.md for a full list of supported illustration names.

Override Default Props

import Undraw from 'react-undraw';

Undraw.setDefaultProps({ primaryColor: 'darkblue' });

Development

npm install
npm run build

To refresh the generated components:

  • Update ./scripts/illustrations.json with any new illustrations.
  • Run npm run refresh (from root) to generate files.