Coder Social home page Coder Social logo

vdelacou / iblis-react-undraw Goto Github PK

View Code? Open in Web Editor NEW
6.0 0.0 1.0 23.66 MB

React component library for undraw.co (1263 illustrations)

Home Page: https://vdelacou.github.io/iblis-react-undraw/iframe.html?id=iblis-react-undraw--page&viewMode=docs

License: Apache License 2.0

JavaScript 0.02% TypeScript 99.98%
react typescript undraw undraw-illustrations svg

iblis-react-undraw's Introduction

Iblis React Undraw

React component library for undraw.co (1263 illustrations)

NPM version

Example

You can find all undraw illustrations here: Undraw.co

Demos

Why

Undraw is wonderful and you can use the illustrations published on unDraw for personal and commercial projects, without the need to include attribution. I always think my projects looks more professional and funnier with illustrations. As we say a picture is worth a thousand words.

There are lot of others undraw react components

But no React component libraries has the following requirements :

  • Written in pure Typescript
  • Have up-to-date illustrations
  • Compile with esNext (I don't want have all the svg in my final bundle when I use only one illustration)
  • Can customize the main colors

Documentation and Basic Usage

All props can be found here

Basic Usage

import React, { FunctionComponent } from 'react';
import { Svg3DModeling } from 'iblis-react-undraw';

export const BasicUsage: FunctionComponent = () => {
  return <Svg3DModeling />;
};

You can extend all the properties of React.SVGProps

By default you can change the height of the components and the width will be set to '100%'

Install

Install the library and the dependencies to your React project

npm install iblis-react-undraw

Dev

To launch dev environement with storybook npm run start

Then you will be able to see your components and test it on http://localhost:9010

All the documention and test are done in the stories folder

Test

You can launch test by running npm run test

To rebuild the project and update with the new undraw design

First download all new svg

cd scripts/scrap_website/
npm install
node index.js

Then generate the typescript components

cd ../generate_components/
npx @svgr/cli --config-file .svgrrc.js --ext tsx --out-dir ../../src/components ../scrap_website/undraw

Then add the new components in src/index.ts and in stories/demo.stories.mdx

Build the library

npm run tsc

or

export NODE_OPTIONS=--max_old_space_size=4096
npm run build

Contribute

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Make the necessary changes and ensure that the tests are passing
  3. Send a pull request

Todo

  • Write more tests with jest

Known issues

  • None for the moment

Thanks

  • Undraw.co for the fantastic work and the keep going illustrations. It's just amazing!

License

Please, refer to LICENSE file

iblis-react-undraw's People

Contributors

vdelacou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

game7

iblis-react-undraw's Issues

How to avoid build warnings (missing files) during build

Using create-react-app with TypeScript. I get one of these for each illustration I'm not using (I guess):

Failed to parse source map from '/home/runner/work/UnboxDemo/UnboxDemo/frontend/node_modules/iblis-react-undraw/src/components/ABetterWorld.tsx' file: 
Error: ENOENT: no such file or directory, open '/home/runner/work/UnboxDemo/UnboxDemo/frontend/node_modules/iblis-react-undraw/src/components/ABetterWorld.tsx'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.