fk-react-ui-components
v5.0.4
Published
Step 1 : Create a file in [ Seeds / Plants / Trees ] <br> Step 2 : It should export an Object with component name and story Component [Refer other components] <br> Step 3 : Story Component should return a react component <br> Step 3 : Created file should
Downloads
216
Maintainers
Keywords
Readme
TO ADD A STORY
Step 1 : Create a file in [ Seeds / Plants / Trees ] Step 2 : It should export an Object with component name and story Component [Refer other components] Step 3 : Story Component should return a react component Step 3 : Created file should be imported in Seeds/index.js or Plants/index.js or Trees/index.js Step 4 : Story Component should import what ever the component to be showcased from the components dir. Step 5 : Story should use knobs to customize its props [https://github.com/storybooks/storybook/tree/master/addons/knobs ].
TO ADD A COMPONENT / HOC
Step 1 : Add a component in components dir Step 2 : Add a story for the component added Step 3 : Raise a PR against master Step 4 : Once merged create release TAG
TO USE IT IN ANY REPO
Step 1 : add entry in package.json with https://github.com/Flipkart/react-ui-components.git#<TAG_VERSION_NO> Step 2 : npm i Step 3 : import react-ui-components in the working directory
TESTING
Tools
| Name | Description | | :-------------:|--------------| | Jest | A JavaScript library for building user interfaces. | | Enzyme | Predictable state container for JavaScript apps. |
Commands
To run all the test cases
npm run test
To run watch mode
npm run test-watch
To collect test coverage information
npm run test-cover
To collect test coverage information and open the info in browser
npm run coverage