Skip to content

Commit

Permalink
chore: story guide and react spreading
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
  • Loading branch information
ovflowd authored Apr 20, 2023
1 parent f6dc39f commit 2eba819
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default MyComponent;

### Best practices for Component development in general

- Avoid spreading props `{ ... }` on the definition of the Component
- Only spread props `{ ... }` on the definition of the Component (Avoid having a variable named `props`)
- Avoid importing `React`, only import the modules from React that you need
- When importing types use `import type { NameOfImport } from 'module'`
- When defining a Component use the `FC` type from React to define the type of the Component
Expand Down Expand Up @@ -222,6 +222,7 @@ export default { component: NameOfComponent } as Meta;
- Stories should have `args` whenever possible, we want to be able to test the different aspects of a Component
- Please follow the template above to keep the Storybooks as consistent as possible
- We recommend reading previous Storybooks from the codebase for inspiration and code guidelines.
- If you need to decorate/wrap your Component/Story with a Container/Provider, please use [Storybook Decorators](https://storybook.js.org/docs/react/writing-stories/decorators)

## Pull Request Policy

Expand Down

1 comment on commit 2eba819

@vercel
Copy link

@vercel vercel bot commented on 2eba819 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.