import React from 'react' import { type Meta } from '@storybook/react' import { Icon } from '~components/Icon' import { StickerSheet, type StickerSheetStory } from '~storybook/components/StickerSheet' import { Button, type ButtonProps } from '../index' export default { title: 'Components/Button/Button (deprecated)', parameters: { chromatic: { disable: false }, controls: { disable: true }, }, tags: ['!dev'], } satisfies Meta const StickerSheetTemplate: StickerSheetStory = { render: ({ isReversed }) => { const REVERSED__VARIANT_PROPS: { title: string props: ButtonProps }[] = [ { title: 'Default', props: { label: 'Label', }, }, { title: 'Primary', props: { label: 'Label', primary: true, }, }, { title: 'Destructive', props: { label: 'Label', destructive: true, }, }, { title: 'Secondary', props: { label: 'Label', secondary: true, }, }, ] const VARIANTS_PROPS: { title: string props: ButtonProps }[] = isReversed ? REVERSED__VARIANT_PROPS : [ ...REVERSED__VARIANT_PROPS, { title: 'Secondary Destructive', props: { label: 'Label', secondary: true, destructive: true, }, }, ] const ICON_LEFT_PROPS: ButtonProps = { label: 'Label', icon: , } const ICON_RIGHT_PROPS: ButtonProps = { label: 'Label', icon: , iconPosition: 'end', } const BADGE_PROPS: ButtonProps = { label: 'Label', badge: { text: '4' }, } const BADGE_LEFT_PROPS: ButtonProps = { ...BADGE_PROPS, icon: , } const BADGE_RIGHT_PROPS: ButtonProps = { ...BADGE_PROPS, icon: , iconPosition: 'end', } return ( <> {VARIANTS_PROPS.map(({ title, props }) => (