mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
22 lines
653 B
JavaScript
22 lines
653 B
JavaScript
import React from 'react';
|
|
|
|
import { storiesOf } from '@storybook/react';
|
|
import { action } from '@storybook/addon-actions';
|
|
import { linkTo } from '@storybook/addon-links';
|
|
|
|
import { Button, Welcome } from '@storybook/react/demo';
|
|
|
|
storiesOf('Other|Demo/Welcome', module).add('to Storybook', () => (
|
|
<Welcome showApp={linkTo('Button')} />
|
|
));
|
|
|
|
storiesOf('Other|Demo/Button', module)
|
|
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
|
|
.add('with some emoji', () => (
|
|
<Button onClick={action('clicked')}>
|
|
<span role="img" aria-label="so cool">
|
|
😀 😎 👍 💯
|
|
</span>
|
|
</Button>
|
|
));
|