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