Our React component library to quickly plug together products. Used in conjunction with our product-boilerplate.
Visit the Storybook for examples of all components
This component library is based on:
Recommended usage is with rebass, this library does not re-export those core primitives (Flex, Box, etc).
We use Storybook to develop the component library locally. To start Storybook locally, run:
yarn run dev
Any .stories.js file will be picked up by Storybook. See their doc on how to write stories to learn more.
There are three steps to use your local version of @nice-boys/components in an app for development:
- Link
@nice-boys/componentsglobally: Runyarn linkin the@nice-boys/componentsdirectory to link the package globally (you only have to do that once on your machine) - Tell your app to use your local version of
@nice-boys/components: Runyarn link @nice-boys/componentsin your app directory that depends on the package (you only have to do this once per app) - Rebuild the components on any change: Run
yarn run build:watchin the components dir to make sure the library rebuilds every time you change/add/remove a component
That's it!
| @nice-boys/components | yourapp |
|---|---|
| yarn link | yarn link @nice-boys/components |
| yarn run build:watch | yarn run dev |
If you want to use the remote version in your app again, simply run yarn unlink @nice-boys/components in the app directory.
Licensed under the MIT license. Copyright © 2019 Max Stoiber