Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 1.05 KB

CREATING_COMPONENTS.md

File metadata and controls

28 lines (16 loc) · 1.05 KB

Creating new components

wix-style-react includes a generator for scaffolding new components.

Run generator in root folder of the project:

npm run generate


You will be asked for component name (which must be in PascalCase) and optional description.

Generator will:


Generator will create a sample .story.js. Read story.js usage document for details.

By default documentation will be shown under Component category. To change it modify category value in src/YourNewComponent/test/storySettings.js.

Make sure to re-arrange the Stories index file as needed. The order of requires in that file is reflected in rendered storybook sidebar.