ant-design/components/checkbox/GroupContext.ts
Zack Chang e74661f509
refactor: resolve circular reference of Checkbox (#42803)
* refactor: resolve circular reference of Checkbox

* chore: add export
2023-06-25 12:18:34 +08:00

16 lines
416 B
TypeScript

import React from 'react';
import type { CheckboxOptionType } from './Group';
export interface CheckboxGroupContext {
name?: string;
toggleOption?: (option: CheckboxOptionType) => void;
value?: any;
disabled?: boolean;
registerValue: (val: string) => void;
cancelValue: (val: string) => void;
}
const GroupContext = React.createContext<CheckboxGroupContext | null>(null);
export default GroupContext;