Skip to content

Commit

Permalink
docs: add contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil committed Jul 12, 2024
1 parent bcd8bf6 commit e4d8d9d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
25 changes: 25 additions & 0 deletions CONTRIBUTING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Each component will consist of:
- `src/index.tsx`: The React component
- `src/styles.ts`: Any related `styled-components`
- `src/utils.ts` : utils for this component
- `src/docs` : documentation for this component [See more](#Documentation)
- `tests/index.test.ts`: Jest / react-testing-library tests for this component

## Adding icons
Expand All @@ -40,3 +41,27 @@ Check the [Icon README](https://github.com/WTTJ/welcome-ui/tree/main/icons/READM
## Reporting issues

You can report issues on our [github project](https://github.com/WTTJ/welcome-ui/issues) 🐛

## Documentation

Our documentation is based on NextJS with mdx files and nodejs script.

### For a Component

All component documentation is now located in its repository's `docs` folder:

- `index.mdx`:
- **Header**: Contains the following information:
- `ariakit`: Link (if used in this component, will be transformed into a button on the page header)
- `description`: From ChatGPT
- `name`
- `packageName`: Name of the npm package
- `usage`: If needed, for example, if the import is different from the component name
- `/examples`:
- **overview.mdx**: The main example shown at the top of the component page
- Others: Your other examples
- `properties.json`: Auto-generated with `yarn watch`. It includes the list of the component's properties.

### For a foundation page

Simply add your new page on it, it's magic!
27 changes: 26 additions & 1 deletion website/build-app/pages/foundations/how-to-contribute.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ Each component will consist of:

- `ComponentName`: Folder with name of component (PascalCase)
- `src/index.tsx`: The React component
- `src/styles.ts`: Any related **styled-components**
- `src/styles.ts`: Any related `styled-components`
- `src/utils.ts` : utils for this component
- `src/docs` : documentation for this component [See more](#Documentation)
- `tests/index.test.ts`: Jest / react-testing-library tests for this component

## Adding icons
Expand All @@ -44,3 +45,27 @@ Check the [Icon README](https://github.com/WTTJ/welcome-ui/tree/main/icons/READM
## Reporting issues

You can report issues on our [github project](https://github.com/WTTJ/welcome-ui/issues) 🐛

## Documentation

Our documentation is based on NextJS with mdx files and nodejs script.

### For a Component

All component documentation is now located in its repository's `docs` folder:

- `index.mdx`:
- **Header**: Contains the following information:
- `ariakit`: Link (if used in this component, will be transformed into a button on the page header)
- `description`: From ChatGPT
- `name`
- `packageName`: Name of the npm package
- `usage`: If needed, for example, if the import is different from the component name
- `/examples`:
- **overview.mdx**: The main example shown at the top of the component page
- Others: Your other examples
- `properties.json`: Auto-generated with `yarn watch`. It includes the list of the component's properties.

### For a foundation page

Simply add your new page on it, it's magic!

0 comments on commit e4d8d9d

Please sign in to comment.