zent
Version:
一套前端设计语言和基于React的实现
23 lines (22 loc) • 632 B
TypeScript
import { Component } from 'react';
import { IDisabledContext } from '../disabled';
export interface ISwitchProps {
checked?: boolean;
onChange?: (checked: boolean) => void;
disabled?: boolean;
checkedText?: string;
uncheckedText?: string;
loading?: boolean;
size?: 'default' | 'small';
className?: string;
}
export declare class Switch extends Component<ISwitchProps> {
static defaultProps: {
size: string;
};
static contextType: import("react").Context<IDisabledContext>;
context: IDisabledContext;
toggle: () => void;
render(): JSX.Element;
}
export default Switch;