-
Notifications
You must be signed in to change notification settings - Fork 78
New Component Checklist
Jenna Badanowski edited this page May 5, 2020
·
3 revisions
Steps for creating a new component: "Component"
- Create new
Componentdirectory undersrc - In
src/ComponentcreateComponent.jsfile- component logic should be here
- import appropriate styles from
fundamental-styles- no styles should be created inside of fundamental-react - add JSDoc comment at the top the file describing the component (this will appear on the documentation website)
- add JSDoc comments for each
propType(these will appear on the documentation website)
- In
src/ComponentcreateComponent.test.jsfile- add unit tests using Jest and Enzyme
- See Testing Guidefor more information
- In
src/Componentcreate__stories__/Component.stories.js- create a storybook page using Component Story Format (CSF)
- See Documentation for more information
- Run
npm run lint- If this command fails, run
npm run lint:fix, fix other errors manually.
- If this command fails, run
- Run
npm run size- If this command fails, edit the
.size-limitfile at the root of the repository
- If this command fails, edit the
- Run
npm run test:storybook:update- This command will take screenshots of your new stories and add them to
visual-regression-testing/__image_snapshots__/and will take jest snapshots of your new stories and add them tosrc/Component/__stories__/__snapshots__/
- This command will take screenshots of your new stories and add them to