123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { createButton } from './Button';
- export default {
- title: 'Example/Button',
-
- argTypes: {
- backgroundColor: { control: 'color' },
- label: { control: 'text' },
- onClick: { action: 'onClick' },
- primary: { control: 'boolean' },
- size: {
- control: { type: 'select' },
- options: ['small', 'medium', 'large'],
- },
- },
- };
- const Template = ({ label, ...args }) => {
-
-
- return createButton({ label, ...args });
- };
- export const Primary = Template.bind({});
- Primary.args = {
- primary: true,
- label: 'Button',
- };
- export const Secondary = Template.bind({});
- Secondary.args = {
- label: 'Button',
- };
- export const Large = Template.bind({});
- Large.args = {
- size: 'large',
- label: 'Button',
- };
- export const Small = Template.bind({});
- Small.args = {
- size: 'small',
- label: 'Button',
- };
|