pocotan001 / react-styleguide-generator

Easily generate a good-looking styleguide by adding some documentation to your React project.
http://pocotan001.github.io/react-styleguide-generator
MIT License
700 stars 76 forks source link

Support for React.PropTypes.shape({ ... }) #12

Open marcello3d opened 9 years ago

marcello3d commented 9 years ago

react-docgen will create a recursive structure for React.PropTypes.shape props.

E.g.:

propTypes: {
  /** `foo` is a structured object */
  foo: React.PropTypes.shape({
    /** A sub-property of `foo` */
    bar: React.PropTypes.number
  })
}

It'd be sweet to show this in the Properties overview. (react-docgen already supports shapes and generates JSON for them.)

marcello3d commented 9 years ago

I take that back, react-docgen doesn't fully support it yet: https://github.com/reactjs/react-docgen/issues/21

theogravity commented 9 years ago

react-docgen now supports it