type.d.ts 776 B

1234567891011121314151617181920212223242526272829303132333435
  1. export interface TdSwitchProps<T = SwitchValue> {
  2. customValue?: {
  3. type: ArrayConstructor;
  4. value?: Array<SwitchValue>;
  5. };
  6. disabled?: {
  7. type: BooleanConstructor;
  8. value?: boolean;
  9. };
  10. icon?: {
  11. type: ArrayConstructor;
  12. value?: string[];
  13. };
  14. label?: {
  15. type: ArrayConstructor;
  16. value?: string[];
  17. };
  18. loading?: {
  19. type: BooleanConstructor;
  20. value?: boolean;
  21. };
  22. size?: {
  23. type: StringConstructor;
  24. value?: 'small' | 'medium' | 'large';
  25. };
  26. value?: {
  27. type: null;
  28. value?: SwitchValue;
  29. };
  30. defaultValue?: {
  31. type: null;
  32. value?: SwitchValue;
  33. };
  34. }
  35. export declare type SwitchValue = string | number | boolean;