diff --git a/addons/info/src/__snapshots__/index.test.js.snap b/addons/info/src/__snapshots__/index.test.js.snap index 5e3aa9c950e6..cba1ad3a3167 100644 --- a/addons/info/src/__snapshots__/index.test.js.snap +++ b/addons/info/src/__snapshots__/index.test.js.snap @@ -1250,6 +1250,55 @@ exports[`addon Info should render and external markdown 1`] = ` +
+

+ Prop Types +

+
+

+ " + TestComponent + " Component +

+ + + + No propTypes defined! + + + +
+
@@ -2601,6 +2650,55 @@ containing **bold**, *cursive* text, \`code\` and [a link](https://github.com)" +
+

+ Prop Types +

+
+

+ " + TestComponent + " Component +

+ + + + No propTypes defined! + + + +
+
diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index 5201f7e3eb7a..cf3bed071a79 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -330,8 +330,8 @@ class Story extends Component { innerChildren.forEach(extract); return; } - if (innerChildren.props && innerChildren.props.innerChildren) { - extract(innerChildren.props.innerChildren); + if (innerChildren.props && innerChildren.props.children) { + extract(innerChildren.props.children); } if ( typeof innerChildren === 'string' || diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot index c7e44a1b5e55..02f1961949a6 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot @@ -198,6 +198,23 @@ exports[`Storyshots Button addons composition 1`] = ` +
+

+ Prop Types +

+
+

+ "InfoButton" Component +

+ + No propTypes defined! + +
+
@@ -573,6 +590,16 @@ exports[`Storyshots Button with new info 1`] = ` +
+

+ "InfoButton" Component +

+ + No propTypes defined! + +
diff --git a/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot b/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot index fcab2c891714..3b8a0976911a 100644 --- a/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot +++ b/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot @@ -423,6 +423,33 @@ exports[`Storyshots Addons|Info.GitHub issues #1814 1`] = ` +
+

+ Prop Types +

+
+

+ "" Component +

+ + No propTypes defined! + +
+
+

+ "" Component +

+ + No propTypes defined! + +
+
@@ -5019,6 +5046,167 @@ exports[`Storyshots Addons|Info.Options.propTablesExclude Exclude component from +
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + - + + + false + + +
+ label + + + + yes + + - + +
+ onClick + + + + - + + + onClick + + +
+ style + + + + - + + + {} + + +
+
+