Tries to find the prop types on react components and extracts their Docblock
description. It uses the same logic as the
propTypeHandler to find the prop types.
When the propDocblockHandler is active any of these components will result in
the output below
import PropTypes from 'prop-types';
class MyComponent extends React.Component {
static propTypes = {
/** Foo */
foo: PropTypes.string,
bar: PropTypes.number,
};
render() {
return <div />;
}
}import PropTypes from 'prop-types';
class MyComponent extends React.Component {
render() {
return <div />;
}
}
MyComponent.propTypes = {
/** Foo */
foo: PropTypes.string,
bar: PropTypes.number,
};import PropTypes from 'prop-types';
const MyComponent = () => <div />;
MyComponent.propTypes = {
/** Foo */
foo: PropTypes.string,
bar: PropTypes.number,
};[
{
"props": {
"foo": {
"description": "Foo"
},
"bar": {
"description": ""
}
}
}
]