Skip to content

Commit

Permalink
Update readme with more content
Browse files Browse the repository at this point in the history
  • Loading branch information
roonyh committed Aug 30, 2016
1 parent 729b454 commit fa87a43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Knobs
> A Prop Editor for react storybook
![usage](usage.gif)

## API

Use function `createKnob` passed to your stories to create a *knob* for a prop.

`createKnob(name, initialValue, type)`

* `name`: Should uniquely idintify the prop. Used as the label of the knob
* `initialValue`: Value used when first rendered
* `type`: Optionally specify a type for the prop. Decides the input type of the knob. Currently the string 'object' is identified and it gives knob a textarea input that will be `eval`ed for an object. By default shows a text input.


```js
import React from 'react';
import Button from './Button';
Expand Down
Binary file added usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa87a43

Please sign in to comment.