type.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { KeysType } from '../common/common';
  2. export interface TdCheckboxGroupProps<T = CheckboxGroupValue> {
  3. borderless?: {
  4. type: BooleanConstructor;
  5. value?: boolean;
  6. };
  7. disabled?: {
  8. type: BooleanConstructor;
  9. value?: boolean;
  10. };
  11. keys?: {
  12. type: ObjectConstructor;
  13. value?: KeysType;
  14. };
  15. max?: {
  16. type: NumberConstructor;
  17. value?: number;
  18. };
  19. name?: {
  20. type: StringConstructor;
  21. value?: string;
  22. };
  23. options?: {
  24. type: ArrayConstructor;
  25. value?: Array<CheckboxOption>;
  26. };
  27. readonly?: {
  28. type: BooleanConstructor;
  29. value?: boolean;
  30. };
  31. value?: {
  32. type: ArrayConstructor;
  33. value?: T;
  34. };
  35. defaultValue?: {
  36. type: ArrayConstructor;
  37. value?: T;
  38. };
  39. }
  40. export declare type CheckboxOption = string | number | CheckboxOptionObj;
  41. export interface CheckboxOptionObj {
  42. label?: string;
  43. value?: string | number;
  44. disabled?: boolean;
  45. checkAll?: true;
  46. }
  47. export declare type CheckboxGroupValue = Array<string | number | boolean>;