GroupContext.d.ts 427 B

123456789101112
  1. import React from 'react';
  2. import type { CheckboxOptionType } from './Group';
  3. export interface CheckboxGroupContext<T = any> {
  4. name?: string;
  5. toggleOption?: (option: CheckboxOptionType<T>) => void;
  6. value?: any;
  7. disabled?: boolean;
  8. registerValue: (val: T) => void;
  9. cancelValue: (val: T) => void;
  10. }
  11. declare const GroupContext: React.Context<CheckboxGroupContext<any> | null>;
  12. export default GroupContext;