postProcessDocumentation.js 359 B

123456789101112
  1. export default function (documentation) {
  2. const props = documentation.props;
  3. if (props) {
  4. Object.values(props).forEach((propInfo) => {
  5. // props with default values should not be required
  6. if (propInfo.defaultValue) {
  7. propInfo.required = false;
  8. }
  9. });
  10. }
  11. return documentation;
  12. }