1 | import * as React from 'react';
|
2 | import type { CheckboxChangeEvent } from './Checkbox';
|
3 | import GroupContext from './GroupContext';
|
4 | export interface CheckboxOptionType<T = any> {
|
5 | label: React.ReactNode;
|
6 | value: T;
|
7 | style?: React.CSSProperties;
|
8 | disabled?: boolean;
|
9 | title?: string;
|
10 | id?: string;
|
11 | onChange?: (e: CheckboxChangeEvent) => void;
|
12 | required?: boolean;
|
13 | }
|
14 | export interface AbstractCheckboxGroupProps<T = any> {
|
15 | prefixCls?: string;
|
16 | className?: string;
|
17 | rootClassName?: string;
|
18 | options?: (CheckboxOptionType<T> | string | number)[];
|
19 | disabled?: boolean;
|
20 | style?: React.CSSProperties;
|
21 | }
|
22 | export interface CheckboxGroupProps<T = any> extends AbstractCheckboxGroupProps<T> {
|
23 | name?: string;
|
24 | defaultValue?: T[];
|
25 | value?: T[];
|
26 | onChange?: (checkedValue: T[]) => void;
|
27 | children?: React.ReactNode;
|
28 | }
|
29 | export type { CheckboxGroupContext } from './GroupContext';
|
30 | export { GroupContext };
|
31 | declare const _default: <T = any>(props: CheckboxGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
|
32 | export default _default;
|