2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2019-2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2019-12-17 20:25:57 +00:00
|
|
|
import * as React from 'react';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
import { text } from '@storybook/addon-knobs';
|
|
|
|
|
2020-09-14 21:56:35 +00:00
|
|
|
import { StoryRow } from './StoryRow';
|
|
|
|
import { Button } from './Button';
|
|
|
|
|
2022-06-07 00:48:02 +00:00
|
|
|
export default {
|
|
|
|
title: 'Sticker Creator/elements',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const _Button = (): JSX.Element => {
|
2019-12-17 20:25:57 +00:00
|
|
|
const onClick = action('onClick');
|
|
|
|
const child = text('text', 'foo bar');
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} primary>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} primary disabled>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
|
|
|
<Button onClick={onClick}>{child}</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} disabled>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} primary pill>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} primary pill disabled>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} pill>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
<StoryRow>
|
2020-09-14 21:56:35 +00:00
|
|
|
<Button onClick={onClick} pill disabled>
|
2019-12-17 20:25:57 +00:00
|
|
|
{child}
|
|
|
|
</Button>
|
|
|
|
</StoryRow>
|
|
|
|
</>
|
|
|
|
);
|
2022-06-07 00:48:02 +00:00
|
|
|
};
|