Skip to content

Commit

Permalink
CORRECT readme for knobs && change comment on deprecating requiring @…
Browse files Browse the repository at this point in the history
…storybook/addon-knobs directly
  • Loading branch information
ndelangen committed Sep 11, 2017
1 parent 5e74ef8 commit 8c23357
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}));
Expand Down
5 changes: 2 additions & 3 deletions addons/knobs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions addons/knobs/src/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
3 changes: 0 additions & 3 deletions addons/knobs/src/vue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8c23357

Please sign in to comment.