2024-02-23 06:23:32 -05:00
|
|
|
import { SplitButton } from '@/features/ui/components/bootstrap-5/split-button'
|
|
|
|
import type { Meta } from '@storybook/react'
|
2024-03-27 06:53:54 -04:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2024-02-23 06:23:32 -05:00
|
|
|
|
|
|
|
type Args = React.ComponentProps<typeof SplitButton>
|
|
|
|
|
|
|
|
export const Dropdown = (args: Args) => {
|
2024-03-27 06:53:54 -04:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return <SplitButton accessibilityLabel={t('expand')} {...args} />
|
2024-02-23 06:23:32 -05:00
|
|
|
}
|
|
|
|
const meta: Meta<typeof SplitButton> = {
|
|
|
|
title: 'Shared/Components/Bootstrap 5/SplitButton',
|
|
|
|
component: SplitButton,
|
|
|
|
args: {
|
|
|
|
align: { sm: 'start' },
|
|
|
|
id: 'split-button',
|
|
|
|
items: [
|
|
|
|
{ eventKey: '1', label: 'Action 1' },
|
|
|
|
{ eventKey: '2', label: 'Action 2' },
|
|
|
|
{ eventKey: '3', label: 'Action 3' },
|
|
|
|
],
|
|
|
|
text: 'Split Button',
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
id: {
|
|
|
|
table: {
|
|
|
|
disable: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
bootstrap5: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
export default meta
|