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