KaiHotz / react-rollup-boilerplate

Boilerplate for creating React component libraries, bundled with Rollup.js to ESM and/or CJS Modules, Storybook, Typescript
https://kaihotz.github.io/react-rollup-boilerplate/
MIT License
300 stars 67 forks source link

Descriptions on props #14

Closed AnthonyCrowcroft closed 4 years ago

AnthonyCrowcroft commented 4 years ago

Hey, just wanted to say great work as this helped extensively for getting styleguidist working in our project but i was wondering if you'd be able to get an example of how to best add descriptions to the props for any component, seen a few examples where they comment in the interface but not sure the best way forward.

AnthonyCrowcroft commented 4 years ago

Nevermind figured it out.

KaiHotz commented 4 years ago

@AnthonyCrowcroft Awesome, I'm glad my repo is of use for you and that you could figure out the comments on the props. Maybe just leave a short comment here on what you did, so it can be a reference for other devs in the future.

Thanks.

AnthonyCrowcroft commented 4 years ago

I honestly went with using the comment technique described above. /** The value to be displayed in the input element */ placing a comment like the above for each prop in the interface filled out the table beautifully :)