ds-button.stories.tsx 922 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { Meta } from '@storybook/react-webpack5'
  2. import { figmaDesignUrl } from '../../../../.storybook/utils/figma-design-url'
  3. import DSButton from '@/shared/components/ds/ds-button'
  4. type Args = React.ComponentProps<typeof DSButton>
  5. export const Button = (args: Args) => {
  6. return <DSButton {...args} />
  7. }
  8. const meta: Meta<typeof DSButton> = {
  9. title: 'Shared / DS Components',
  10. component: DSButton,
  11. args: {
  12. children: 'Button',
  13. },
  14. argTypes: {
  15. size: {
  16. control: 'radio',
  17. options: ['lg', 'md', 'sm'],
  18. },
  19. variant: {
  20. control: 'radio',
  21. options: ['primary', 'secondary', 'tertiary', 'danger'],
  22. },
  23. },
  24. parameters: {
  25. controls: {
  26. include: ['children', 'disabled', 'isLoading', 'size', 'variant'],
  27. },
  28. ...figmaDesignUrl(
  29. 'https://www.figma.com/design/aJQlecvqCS9Ry8b6JA1lQN/DS---Components?node-id=4565-2932&m=dev'
  30. ),
  31. },
  32. }
  33. export default meta