From d29326105109d95e1f3c0d144d616fefe0c38984 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 25 May 2017 17:36:31 +0200 Subject: [PATCH 1/2] ADD a global to storyshots to make it work for series with info addon --- addons/storyshots/package.json | 1 + addons/storyshots/src/index.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/addons/storyshots/package.json b/addons/storyshots/package.json index fff48d87337b..d846e39ebc28 100644 --- a/addons/storyshots/package.json +++ b/addons/storyshots/package.json @@ -23,6 +23,7 @@ }, "dependencies": { "babel-runtime": "^6.23.0", + "global": "^4.3.2", "prop-types": "^15.5.8", "read-pkg-up": "^2.0.0" }, diff --git a/addons/storyshots/src/index.js b/addons/storyshots/src/index.js index 6c5f9ab39bce..44e06397e081 100644 --- a/addons/storyshots/src/index.js +++ b/addons/storyshots/src/index.js @@ -1,4 +1,5 @@ import path from 'path'; +import global from 'global'; import readPkgUp from 'read-pkg-up'; import addons from '@storybook/addons'; import runWithRequireContext from './require_context'; @@ -10,6 +11,7 @@ export { snapshotWithOptions, snapshot, renderOnly } from './test-bodies'; let storybook; let configPath; +global.STORYBOOK_REACT_CLASSES = global.STORYBOOK_REACT_CLASSES || {}; const babel = require('babel-core'); From 6be44e97886427f77c52bed1f99d8a9f0727400d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 25 May 2017 17:42:27 +0200 Subject: [PATCH 2/2] FIX linting --- addons/knobs/src/components/Panel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/knobs/src/components/Panel.js b/addons/knobs/src/components/Panel.js index 822cbf123ddc..d56aca665da8 100644 --- a/addons/knobs/src/components/Panel.js +++ b/addons/knobs/src/components/Panel.js @@ -66,7 +66,9 @@ export default class Panel extends React.Component { this.options = options; if (options.debounce) { - this.emitChange = debounce(this.emitChange, options.debounce.wait, { leading: options.debounce.leading }); + this.emitChange = debounce(this.emitChange, options.debounce.wait, { + leading: options.debounce.leading, + }); } }