1.0.0 • Published 2 years ago

@machinistdao/component-library v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Machinist Component Library

Storybook

This library extends Material UI and contains common React Components for Machinist Frontends.

Getting Started

We use React Storybook to build reusable components in isolation. To get started with Storybook first:

  • Clone project and run yarn install
  • Launch Storybook: yarn storybook

Story files are contained under the stories directory and illustrate/validate various component states.

Linking with frontend projects for local development

To validate changes in this repo quickly and avoid constant package publishing during development cycles you will need to leverage yarn link to link this package to your frontend project.

Run:

  • yarn build to rollup this project.
  • cd lib
  • yarn link
  • cd FRONTEND PROJECT
  • yarn link @machinistdao/component-library

Because there are peer dependencies of Material UI and React, you will also need to link these modules to avoid conflicts and multiple instances.

NAVIGATE TO FRONTEND PROJECT DIR (NOT THIS REPO)
yarn install
cd node_modules/react
yarn link
cd ../react-dom
yarn link
cd ../@material-ui/core
yarn link

cd THIS PROJECT
yarn link react
yarn link react-dom
yarn link @material-ui/core

Read more about why we need to do this here: https://github.com/facebook/react/issues/14257