gw-gel-poc
v0.1.6
Published
A simple template for a custom React component library
Downloads
8
Readme
GW React Component Library POC
Get Started
To get started clone the repo and then run npm i
to install the component libraries dependencies.
Storybook
To view the components run npm run storybook
to run Storybook locally. This will show you all of the components in the component library.
Testing
To test the components run npm run test
. This will run all of the Jest tests in the component library.
Publishing updates
When making updates to the component library they must be published to the NPM registry. Update the version of the component library in the package.json
file and commit the changes to GitLab.
Next compile the index.js files by running npm run rollup
.
You can then publish the updates by running npm publish
.
Using the component library
To use the component library on a separate project you will first need to install the library by running npm i gw-gel-poc --save-dev
.
You will then be able to use components from the component library in your project. To do this you will need to import the library, for example, import { Button } from 'gw-gel-poc';
.
Then use will be able to use the component, for example: <Button label='Hello world!' />
.
You will be able to see how to use the components via Storybook.