Skip to content

Commit

Permalink
Merge pull request #11 from kadirahq/wrap-to-withKnobs
Browse files Browse the repository at this point in the history
Renamed ‘wrap’ to ‘withKnobs’
  • Loading branch information
roonyh committed Aug 30, 2016
2 parents bf31747 + 83888be commit 781c2f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function createKnob(name, value, type) {
return value;
}

function wrap(storyFn) {
function withKnobs(storyFn) {
const channel = addons.getChannel();

return context => {
Expand All @@ -48,4 +48,4 @@ function wrap(storyFn) {
};
}

export { register, createKnob, wrap };
export { register, createKnob, withKnobs };
4 changes: 2 additions & 2 deletions src/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { action } from '@kadira/storybook-addon-actions';
import { createKnob, wrap } from '../index';
import { createKnob, withKnobs } from '../index';
import Button from './Button';

storiesOf('Button', module)
.addDecorator((story, context) => (wrap(story)(context)))
.addDecorator((story, context) => (withKnobs(story)(context)))
.add('default view', () => (
<Button
onClick={ action('button clicked') }
Expand Down

0 comments on commit 781c2f2

Please sign in to comment.