type.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { KeysType } from '../common/common';
  2. export interface TdRadioGroupProps<T = RadioValue> {
  3. allowUncheck?: {
  4. type: BooleanConstructor;
  5. value?: boolean;
  6. };
  7. borderless?: {
  8. type: BooleanConstructor;
  9. value?: boolean;
  10. };
  11. disabled?: {
  12. type: BooleanConstructor;
  13. value?: boolean;
  14. };
  15. icon?: {
  16. type: null;
  17. value?: 'circle' | 'line' | 'dot' | Array<string>;
  18. };
  19. keys?: {
  20. type: ObjectConstructor;
  21. value?: KeysType;
  22. };
  23. name?: {
  24. type: StringConstructor;
  25. value?: string;
  26. };
  27. options?: {
  28. type: ArrayConstructor;
  29. value?: Array<RadioOption>;
  30. };
  31. placement?: {
  32. type: StringConstructor;
  33. value?: 'left' | 'right';
  34. };
  35. readonly?: {
  36. type: BooleanConstructor;
  37. value?: boolean;
  38. };
  39. value?: {
  40. type: null;
  41. value?: T;
  42. };
  43. defaultValue?: {
  44. type: null;
  45. value?: T;
  46. };
  47. }
  48. export declare type RadioOption = string | number | RadioOptionObj;
  49. export interface RadioOptionObj {
  50. label?: string;
  51. value?: string | number;
  52. readonly?: boolean;
  53. disabled?: boolean;
  54. allowUncheck?: boolean;
  55. }
  56. export declare type RadioValue = string | number | boolean;