2024-02-14 10:04:08 -05:00
|
|
|
import Button from '@/features/ui/components/bootstrap-5/button'
|
2024-03-06 06:31:25 -05:00
|
|
|
import { Meta } from '@storybook/react'
|
2024-02-14 10:04:08 -05:00
|
|
|
|
|
|
|
type Args = React.ComponentProps<typeof Button>
|
|
|
|
|
|
|
|
export const NewButton = (args: Args) => {
|
|
|
|
return <Button {...args} />
|
|
|
|
}
|
|
|
|
|
2024-04-16 11:06:42 -04:00
|
|
|
export const ButtonWithLeadingIcon = (args: Args) => {
|
|
|
|
return <Button leadingIcon="add" {...args} />
|
|
|
|
}
|
|
|
|
|
|
|
|
export const ButtonWithTrailingIcon = (args: Args) => {
|
|
|
|
return <Button trailingIcon="add" {...args} />
|
|
|
|
}
|
|
|
|
|
|
|
|
export const ButtonWithIcons = (args: Args) => {
|
|
|
|
return <Button trailingIcon="add" leadingIcon="add" {...args} />
|
|
|
|
}
|
|
|
|
|
2024-02-14 10:04:08 -05:00
|
|
|
const meta: Meta<typeof Button> = {
|
|
|
|
title: 'Shared / Components / Bootstrap 5 / Button',
|
|
|
|
component: Button,
|
|
|
|
args: {
|
2024-03-06 06:31:25 -05:00
|
|
|
children: 'A Bootstrap 5 Button',
|
|
|
|
disabled: false,
|
|
|
|
isLoading: false,
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
size: {
|
|
|
|
control: 'radio',
|
|
|
|
options: ['small', 'default', 'large'],
|
|
|
|
},
|
|
|
|
variant: {
|
|
|
|
control: 'radio',
|
|
|
|
options: [
|
|
|
|
'primary',
|
|
|
|
'secondary',
|
|
|
|
'ghost',
|
|
|
|
'danger',
|
|
|
|
'danger-ghost',
|
|
|
|
'premium',
|
|
|
|
],
|
|
|
|
},
|
2024-02-14 10:04:08 -05:00
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
bootstrap5: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
export default meta
|