Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 934f4a5

Browse files
Update _Button_ story with action
1 parent 154981c commit 934f4a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎stories/Button.stories.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import Provider from './Provider.js';
3+
import { action } from '@storybook/addon-actions';
34
import { storiesOf } from '@storybook/react';
45
import { withKnobs, text } from '@storybook/addon-knobs';
56
import Button from '../src/components/Button';
@@ -12,5 +13,5 @@ storiesOf('Button', module)
1213
.addDecorator(withKnobs)
1314

1415
.add('default', () => (
15-
<Button label={text('label', 'Hello Button')} id="abc" onClick={()=>console.log('click')} />
16+
<Button label={text('label', 'Hello Button')} id="abc" onClick={action('button-click')} />
1617
));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /