import { Meta, StoryFn, StoryObj } from '@storybook/react'
import React from 'react'
import StoryWrapper from '../../utils/story-wrapper.jsx'
import { Box, Icon, Label } from '../index.js'
import { Button, ButtonProps } from './index.js'
const ButtonVariant: ButtonProps['variant'][] = ['text', 'outlined', 'contained', 'light']
const ButtonSize: ButtonProps['size'][] = ['default', 'sm', 'lg', 'icon']
const ButtonColor: ButtonProps['color'][] = ['primary', 'secondary', 'danger', 'success', 'info']
export const Default: StoryObj = {
render: (args) => ,
}
export const Examples: StoryFn = () => (
{ButtonVariant.map((variant) => (
))}
{ButtonSize.map((size) => (
<>
{ButtonVariant.map((variant) => (
))}
>
))}
{ButtonColor.map((color) => (
<>
{ButtonVariant.map((variant) => (
))}
>
))}
{ButtonSize.map((size) => (
<>
{ButtonVariant.map((variant) => (
))}
>
))}
{ButtonSize.map((size) => (
<>
{ButtonVariant.map((variant) => (
))}
>
))}
)
const meta: Meta = {
title: 'DesignSystem/Atoms/Button',
component: Button,
args: {
variant: ButtonVariant[0],
size: ButtonSize[0],
color: ButtonColor[0],
disabled: false,
rounded: false,
},
parameters: {
controls: {
include: ['variant', 'disabled', 'rounded', 'size', 'color'],
},
},
argTypes: {
onClick: { action: 'clicked' },
variant: { options: ButtonVariant, control: { type: 'select' } },
size: { options: ButtonSize, control: { type: 'select' } },
color: { options: ButtonColor, control: { type: 'select' } },
},
}
export default meta