@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
31 lines (30 loc) • 995 B
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { ConfigConsumerProps } from '../config-provider';
export interface SwitchProps {
prefixCls?: string;
size?: 'small' | 'default';
className?: string;
checked?: boolean;
defaultChecked?: boolean;
onChange?: (checked: boolean) => any;
checkedChildren?: React.ReactNode;
unCheckedChildren?: React.ReactNode;
disabled?: boolean;
loading?: boolean;
autoFocus?: boolean;
style?: React.CSSProperties;
}
export default class Switch extends React.Component<SwitchProps, {}> {
static propTypes: {
prefixCls: PropTypes.Requireable<string>;
size: PropTypes.Requireable<"small" | "default" | undefined>;
className: PropTypes.Requireable<string>;
};
private rcSwitch;
focus(): void;
blur(): void;
saveSwitch: (node: any) => void;
renderSwitch: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}