0.0.6-snapshot • Published 3 years ago

@krishnahingu/ui-lib v0.0.6-snapshot

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

React Component Library as ui-lib

Requirements

  • Node 16.X
  • Yarn 2.X
  • Webpack 5.X
  • Typscript
  • TS-Node
  • React 17.X

Installation

  • Clone the project from GitLab
  • Use yarn install to update the packages.
  • Use yarn build to build the project.
  • local development TBC
  • After successfull build, The project will create a lib directory
  • In lib directory there should be 3 types of exported module
    1. CommonJS
    2. Esm
    3. UMD

Now the exported module are ready to use in any react project using npm or yarn as ui-lib as dependency.

// Example
import {Button} from 'ui-lib';

const MyComponent = ()=>{
    return(
        <Button>My Button</Button>
    )
}

Storybook


Run local development storybook

  • use yarn storybook to run the dev server, it will run at http://localhost:4200

Run build

  • use yarn build-storybook to create production build of storybook. It will create separate directory of build file storybook-static.