Design system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 rivejä
933 B

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