1 | import { Component, ReactNode } from 'react';
|
2 | import PropTypes from 'prop-types';
|
3 | import { Size } from '../_util/enum';
|
4 | export interface SwitchProps {
|
5 | prefixCls?: string;
|
6 | size?: Size;
|
7 | className?: string;
|
8 | checked?: boolean;
|
9 | defaultChecked?: boolean;
|
10 | onChange?: (checked: boolean) => any;
|
11 | checkedChildren?: ReactNode;
|
12 | unCheckedChildren?: ReactNode;
|
13 | disabled?: boolean;
|
14 | loading?: boolean;
|
15 | }
|
16 | export default class Switch extends Component<SwitchProps, {}> {
|
17 | static displayName: string;
|
18 | static propTypes: {
|
19 | prefixCls: PropTypes.Requireable<string>;
|
20 | size: PropTypes.Requireable<Size>;
|
21 | className: PropTypes.Requireable<string>;
|
22 | };
|
23 | private rcSwitch;
|
24 | focus(): void;
|
25 | blur(): void;
|
26 | saveSwitch: (node: any) => void;
|
27 | render(): JSX.Element;
|
28 | }
|