diff --git a/addons/knobs/README.md b/addons/knobs/README.md index dc5a5420db8d..123dfbe59424 100644 --- a/addons/knobs/README.md +++ b/addons/knobs/README.md @@ -256,9 +256,9 @@ Usage: ```js import { storiesOf } from '@storybook/react'; -const stories = storiesOf('') +const stories = storiesOf('Storybook Knobs', module); -story.addDecorator(withKnobsOptions({ +stories.addDecorator(withKnobsOptions({ debounce: { wait: number, leading: boolean}, // Same as lodash debounce. timestamps: true // Doesn't emit events while user is typing. })); diff --git a/addons/knobs/src/index.js b/addons/knobs/src/index.js index e433dedb97f3..2681f3860fb2 100644 --- a/addons/knobs/src/index.js +++ b/addons/knobs/src/index.js @@ -14,9 +14,8 @@ deprecate( 'Using @storybook/addon-knobs directly is discouraged, please use @storybook/addon-knobs/{{framework}}' ); -// "Higher order component" / wrapper style API -// In 3.3, this will become `withKnobs`, once our decorator API supports it. -// See https://github.com/storybooks/storybook/pull/1527 +// generic higher-order component decorator for all platforms - usage is discouraged +// This file Should be removed with 4.0 release function wrapperKnobs(options) { const channel = addons.getChannel(); manager.setChannel(channel); diff --git a/addons/knobs/src/react/index.js b/addons/knobs/src/react/index.js index 3b4ae1e68ab8..e1c1b5d736d5 100644 --- a/addons/knobs/src/react/index.js +++ b/addons/knobs/src/react/index.js @@ -7,9 +7,6 @@ import { knob, text, boolean, number, color, object, array, date, select, manage export { knob, text, boolean, number, color, object, array, date, select }; -/** - * Handles a react story - */ export const reactHandler = (channel, knobStore) => getStory => context => { const initialContent = getStory(context); const props = { context, storyFn: getStory, channel, knobStore, initialContent }; diff --git a/addons/knobs/src/vue/index.js b/addons/knobs/src/vue/index.js index 8e294c49af68..9cc2590c7fc5 100644 --- a/addons/knobs/src/vue/index.js +++ b/addons/knobs/src/vue/index.js @@ -42,9 +42,6 @@ export const vueHandler = (channel, knobStore) => getStory => context => ({ }, }); -// "Higher order component" / wrapper style API -// In 3.3, this will become `withKnobs`, once our decorator API supports it. -// See https://github.com/storybooks/storybook/pull/1527 function wrapperKnobs(options) { const channel = addons.getChannel(); manager.setChannel(channel);