Design system.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

55 rindas
1.0 KiB

  1. import * as React from 'react';
  2. import type { Meta } from '@storybook/react';
  3. import { ActionButton as Component, ActionButtonProps as Props } from '.';
  4. import { Button } from '@tesseract-design/web-base';
  5. const meta: Meta<typeof Component> = {
  6. component: Component,
  7. argTypes: {
  8. type: {
  9. control: { type: 'select' },
  10. options: Button.AVAILABLE_TYPES,
  11. },
  12. variant: {
  13. control: { type: 'select' },
  14. options: Button.AVAILABLE_VARIANTS,
  15. },
  16. size: {
  17. control: { type: 'select' },
  18. options: Button.AVAILABLE_SIZES,
  19. },
  20. subtext: {
  21. control: { type: 'text' },
  22. },
  23. badge: {
  24. control: { type: 'text' },
  25. },
  26. icon: {
  27. control: { type: 'text' },
  28. },
  29. children: {
  30. control: { type: 'text' },
  31. },
  32. onClick: {
  33. table: {
  34. disable: true,
  35. },
  36. action: 'clicked',
  37. },
  38. },
  39. args: {
  40. ...(Component.defaultProps ?? {}),
  41. subtext: 'Subtext',
  42. badge: '1',
  43. children: Component.displayName,
  44. },
  45. };
  46. export const ActionButton = (args: Omit<Props, 'ref'>) => (
  47. <Component
  48. {...args}
  49. />
  50. );
  51. export default meta;