Design system.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

57 řádky
983 B

  1. import * as React from 'react';
  2. import type { Meta } from '@storybook/react';
  3. import { TextControl } from '@tesseract-design/web-base';
  4. import { MaskedTextInput as Component, MaskedTextInputProps 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. variant: {
  15. control: {
  16. type: 'select',
  17. },
  18. options: TextControl.AVAILABLE_VARIANTS,
  19. },
  20. size: {
  21. control: {
  22. type: 'select',
  23. },
  24. options: TextControl.AVAILABLE_SIZES,
  25. },
  26. autoComplete: {
  27. table: {
  28. disable: true,
  29. },
  30. },
  31. length: {
  32. control: {
  33. type: 'number',
  34. },
  35. },
  36. onChange: {
  37. table: {
  38. disable: true,
  39. },
  40. action: 'changed',
  41. },
  42. },
  43. args: {
  44. ...(Component.defaultProps ?? {}),
  45. label: Component.displayName,
  46. },
  47. };
  48. export const MaskedTextInput = (args: Omit<Props, 'ref'>) => (
  49. <Component
  50. {...args}
  51. />
  52. );
  53. export default meta;