refactor documentation to remove react-desc
See original GitHub issueWe can have issues in our documentation due to react-desc
trying to combine propTypes
with documentation and not always working well on either side. For example, we cannot reference propTypes from react-desc in other components due to how they are decorated. And, we need the ability to provide richer example syntaxes that don’t work with the more simplified propType derived approach.
A suggestion is to have two files per component: propTypes.js
and doc.js
. The former would just have the propTypes
and could be reference from other components. The latter would change the current documentation by removing the programatic prop definitions and instead support a richer syntaxExamples
per each property, similar to what we do in grommet-site
. The README.md files per component would be generated from doc.js
with better syntax examples that aligned with grommet-site.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Two years later …
react-desc
entirely.Superceded by #5353