diff --git a/src/components/Story.js b/src/components/Story.js index 384ebc34fd9b..504726baf98a 100644 --- a/src/components/Story.js +++ b/src/components/Story.js @@ -224,7 +224,7 @@ export default class Story extends React.Component { _getPropTables() { const types = new Map(); - if (this.props.propTables === false) { + if (this.props.propTables === null) { return null; } diff --git a/src/index.js b/src/index.js index 234745477683..873ed68dc590 100644 --- a/src/index.js +++ b/src/index.js @@ -25,6 +25,13 @@ export default { ..._options }; + // props.propTables can only be either an array of components or null + // propTables option is allowed to be set to 'false' (a boolean) + // if the option is false, replace it with null to avoid react warnings + if (!options.propTables) { + options.propTables = null; + } + this.add(storyName, (context) => { const props = { info,