Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Merge pull request #2 from kadirahq/add-readme
Browse files Browse the repository at this point in the history
Add a basic README
  • Loading branch information
Muhammed Thanish authored Aug 6, 2016
2 parents 1e3087e + 02a1bc6 commit 0caca1e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Storybook Addon: Action Logger
# Action Logger Addon

The Action Logger addon can be used to display data received by event handlers. This addon works with both [React Storybook](https://github.com/kadirahq/react-storybook) and [React Native Storybook](https://github.com/kadirahq/react-native-storybook) (included by default).

![](docs/screenshot.png)

To use the action logger, import the `action` function and use it to create actions handlers. When creating action handlers, provide a name to make it easier to identify.

```js
import { storiesOf } from '@kadira/storybook'
import { action } from '@kadira/storybook-addon-actions'

storiesOf('Button', module)
.add('default view', () => (
<Button onClick={ action('hello') }>
Hello World!
</Button>
))
```
Binary file added docs/screenshot.png
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 0caca1e

Please sign in to comment.