2024-03-06 06:31:25 -05:00
|
|
|
import IconButton from '@/features/ui/components/bootstrap-5/icon-button'
|
|
|
|
import type { Meta } from '@storybook/react'
|
2024-03-27 06:53:54 -04:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2024-03-06 06:31:25 -05:00
|
|
|
|
|
|
|
type Args = React.ComponentProps<typeof IconButton>
|
|
|
|
|
|
|
|
export const Icon = (args: Args) => {
|
2024-03-27 06:53:54 -04:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return <IconButton accessibilityLabel={t('add')} disabled {...args} />
|
2024-03-06 06:31:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
const meta: Meta<typeof IconButton> = {
|
|
|
|
title: 'Shared / Components / Bootstrap 5 / IconButton',
|
|
|
|
component: IconButton,
|
|
|
|
args: {
|
|
|
|
disabled: false,
|
|
|
|
icon: 'add',
|
|
|
|
isLoading: false,
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
size: {
|
|
|
|
control: 'radio',
|
|
|
|
options: ['small', 'default', 'large'],
|
|
|
|
},
|
|
|
|
variant: {
|
|
|
|
control: 'radio',
|
|
|
|
options: [
|
|
|
|
'primary',
|
|
|
|
'secondary',
|
|
|
|
'ghost',
|
|
|
|
'danger',
|
|
|
|
'danger-ghost',
|
|
|
|
'premium',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
bootstrap5: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
export default meta
|