diff --git a/addons/info/src/components/PropTable.js b/addons/info/src/components/PropTable.js index 5fdec2d4ddf0..96000bb1182a 100644 --- a/addons/info/src/components/PropTable.js +++ b/addons/info/src/components/PropTable.js @@ -36,13 +36,23 @@ 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] && + type.__docgenInfo.props[property].type + ) { + propType = type.__docgenInfo.props[property].type.name; + } + } props[property] = { property, propType, required, description }; } } diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index e8ef89f5c398..a3736a479cb3 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -121,6 +121,7 @@ export default class Story extends React.Component {