Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to document react compound components using JSDoc? #2064

Open
Minglu-Huo opened this issue Jul 17, 2023 · 1 comment
Open

How to document react compound components using JSDoc? #2064

Minglu-Huo opened this issue Jul 17, 2023 · 1 comment

Comments

@Minglu-Huo
Copy link

image
image
image

@jweird
Copy link

jweird commented Jul 20, 2023

The way ive gotten it to work is something like this:

/**
 * Descriptions
 *
 * @param {Object} props
 * @param {string} [props.baseColor] - Provide a color in hex.
 * @param {React.ReactElement} [props.icon] - Icon element.
 * @param {Object} [props.sx] - The system prop 
 * @param {React.ReactNode} props.label - The content of the component
 *  
 */
 
function Badge(props) {
...
}
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants