diff --git a/addons/info/src/components/PropTable.js b/addons/info/src/components/PropTable.js index 5fdec2d4ddf..3aa67e5a860 100644 --- a/addons/info/src/components/PropTable.js +++ b/addons/info/src/components/PropTable.js @@ -36,13 +36,18 @@ export default class PropTable extends React.Component { continue; } const typeInfo = type.propTypes[property]; - const propType = PropTypesMap.get(typeInfo) || 'other'; + let propType = PropTypesMap.get(typeInfo) || 'other'; const required = typeInfo.isRequired === undefined ? 'yes' : 'no'; const description = type.__docgenInfo && type.__docgenInfo.props && type.__docgenInfo.props[property] ? type.__docgenInfo.props[property].description : null; + if (propType === 'other') { + if (type.__docgenInfo && type.__docgenInfo.props && type.__docgenInfo.props[property]) { + propType = type.__docgenInfo.props[property].type; + } + } props[property] = { property, propType, required, description }; } }