Skip to content

Commit

Permalink
Merge pull request #1406 from storybooks/addon-knobs-readme
Browse files Browse the repository at this point in the history
Updated addon knob readme.
  • Loading branch information
ndelangen authored Jul 4, 2017
2 parents 89c5f3b + e0fe774 commit c14bf09
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,17 @@ const defaultValue = new Date('Jan 20 2017');
const value = date(label, defaultValue);
```

### withKnobs vs withKnobsOptions

If you feel like this addon is not performing well enough there is an option to use `withKnobsOptions` instead of `withKnobs`.
Usage:
```
story.addDecorator(withKnobsOptions({
debounce: { wait: number, leading: boolean}, // Same as lodash debounce.
timestamps: true // Doesn't emit events while user is typing.
}));
```

## Typescript

If you are using typescript, make sure you have the type definitions installed for the following libs:
Expand Down

0 comments on commit c14bf09

Please sign in to comment.