- Create app: create-react-app s1. (OPTIONAL) Create directory for components. This makes it easy to tell the style guide what components to render to the style guide.
- npm install the node modules : npm install --save-dev react-styleguidist
- Make markdown files for all the components you are rendering to style guide (
js <APP NAME> 1
) - Create styleguide.config.js in the root of your project
- Add module exports code into style guide config: https://react-styleguidist.js.org/docs/components.html
- Run style guide server : npx styleguidist server
mkavarts / react-style-guide Goto Github PK
View Code? Open in Web Editor NEWHow to create a React component style guide