-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
docsImprovements or additions to the documentation.Improvements or additions to the documentation.package: joy-uiSpecific to Joy UI.Specific to Joy UI.umbrellaFor grouping multiple issues to provide a holistic viewFor grouping multiple issues to provide a holistic view
Milestone
Description
We need your help!
Some Joy components do not have TypeScript versions of demos but only JavaScript demos. We need the community's help to ensure that all Joy components have TypeScript demos.
Contribution guides
- Pick a component in the “Ready to be picked up” section
- Go to
docs/data/joy/components/${component}directory. - For the demos that do not have matching typescript (
.tsx) versions, create typescript files with the same name. For example,docs/data/joy/components/CheckboxhasCheckboxColors.jswhile it doesn't haveCheckboxColors.tsx. CreateCheckboxColors.tsx.
Warning ${Component}Variables.js and ${Component}Usage.js, we DO NOT need typescript versions.
- In the typescript file, copy/paste the code from its matching JavaScript demo, and turn it into type-safe code. For example, you can type the states, refs or the arguments of functions inside the demo. In some demos, the TypeScript version can be exactly the same as the JavaScript version. This is fine.
- Run
yarn docs:typescript:formattedandyarn prettier. - Verify that it works
- Run
yarn docs:dev. - go to URL
/joy-ui/react-{component}/(e.g.,/joy-ui/react-checkbox) and check the demos (it should look the same). - For every demo, both the "js" and "ts" toggle buttons at the left-top of the source code must be enabled as shown in the screenshot below.
- Run
- Open a PR, put the URL to the the end of the component below (so that everyone knows it has been taken) and check the box.
- Tag @mui/core to review
If you come across any issue or are unsure of the changes, feel free to open a PR and describe the problem + tag @mui/core for help.
Example PR
List of components
Ready to be picked up
- Checkbox [docs][joy] Build TS versions for Checkbox component demos #36381
- Divider [docs][joy] Add typescript demos for
Divider#36374 - Select [docs][joy] Build TS versions for Select component demos #36380
- Switch [docs][joy] Build TS versions for Switch component demos #36379
- List [docs][joy] Build TS versions for List component demos #36382
- Typography [docs][joy] Build TS versions for Typography component demos #36378
- Textarea [docs][joy] Build TS versions for Textarea component demos #36371
- Radio [docs][joy] Build TS versions for Radio component demos #36406
- Modal [docs][joy] Build TS versions for Modal component demos #36385
- Menu [docs][joy] Build TS versions for Menu component demos #36383
siriwatknp
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to the documentation.Improvements or additions to the documentation.package: joy-uiSpecific to Joy UI.Specific to Joy UI.umbrellaFor grouping multiple issues to provide a holistic viewFor grouping multiple issues to provide a holistic view
