signal-desktop/sticker-creator/elements/Button.stories.tsx

56 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-12-17 20:25:57 +00:00
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { text } from '@storybook/addon-knobs';
import { StoryRow } from './StoryRow';
import { Button } from './Button';
2019-12-17 20:25:57 +00:00
storiesOf('Sticker Creator/elements', module).add('Button', () => {
const onClick = action('onClick');
const child = text('text', 'foo bar');
return (
<>
<StoryRow>
<Button onClick={onClick} primary>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} primary disabled>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick}>{child}</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} disabled>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} primary pill>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} primary pill disabled>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} pill>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
<StoryRow>
<Button onClick={onClick} pill disabled>
2019-12-17 20:25:57 +00:00
{child}
</Button>
</StoryRow>
</>
);
});