1 | import * as React from 'react';
|
2 | export declare type SwitchSize = 'small' | 'default';
|
3 | export declare type SwitchChangeEventHandler = (checked: boolean, event: MouseEvent) => void;
|
4 | export declare type SwitchClickEventHandler = SwitchChangeEventHandler;
|
5 | export interface SwitchProps {
|
6 | prefixCls?: string;
|
7 | size?: SwitchSize;
|
8 | className?: string;
|
9 | checked?: boolean;
|
10 | defaultChecked?: boolean;
|
11 | onChange?: SwitchChangeEventHandler;
|
12 | onClick?: SwitchClickEventHandler;
|
13 | checkedChildren?: React.ReactNode;
|
14 | unCheckedChildren?: React.ReactNode;
|
15 | disabled?: boolean;
|
16 | loading?: boolean;
|
17 | autoFocus?: boolean;
|
18 | style?: React.CSSProperties;
|
19 | title?: string;
|
20 | tabIndex?: number;
|
21 | }
|
22 | interface CompoundedComponent extends React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLElement>> {
|
23 | __ANT_SWITCH: boolean;
|
24 | }
|
25 | declare const Switch: CompoundedComponent;
|
26 | export default Switch;
|