1 | import * as React from 'react';
|
2 | import type { CheckboxRef } from 'rc-checkbox';
|
3 | export interface AbstractCheckboxProps<T> {
|
4 | prefixCls?: string;
|
5 | className?: string;
|
6 | rootClassName?: string;
|
7 | defaultChecked?: boolean;
|
8 | checked?: boolean;
|
9 | style?: React.CSSProperties;
|
10 | disabled?: boolean;
|
11 | title?: string;
|
12 | onChange?: (e: T) => void;
|
13 | onClick?: React.MouseEventHandler<HTMLElement>;
|
14 | onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
15 | onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
16 | onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
17 | onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
18 | value?: any;
|
19 | tabIndex?: number;
|
20 | name?: string;
|
21 | children?: React.ReactNode;
|
22 | id?: string;
|
23 | autoFocus?: boolean;
|
24 | type?: string;
|
25 | skipGroup?: boolean;
|
26 | required?: boolean;
|
27 | }
|
28 | export interface CheckboxChangeEventTarget extends CheckboxProps {
|
29 | checked: boolean;
|
30 | }
|
31 | export interface CheckboxChangeEvent {
|
32 | target: CheckboxChangeEventTarget;
|
33 | stopPropagation: () => void;
|
34 | preventDefault: () => void;
|
35 | nativeEvent: MouseEvent;
|
36 | }
|
37 | export interface CheckboxProps extends AbstractCheckboxProps<CheckboxChangeEvent> {
|
38 | indeterminate?: boolean;
|
39 | }
|
40 | declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<CheckboxRef>>;
|
41 | export default Checkbox;
|