@ucloud-fe/react-components
Version:
UCloud react components
20 lines (19 loc) • 684 B
TypeScript
import React, { ReactNode } from 'react';
export interface SwitchProps {
/** 是否选中 */
checked?: boolean;
/** 默认选中状态 */
defaultChecked?: boolean;
/** 选中状态改变时的回调 */
onChange?: (checked: boolean) => void;
/** 是否禁用 */
disabled?: boolean;
/** 尺寸 */
size?: 'sm' | 'md' | 'lg';
/** 打开的文字 */
onText?: ReactNode;
/** 关闭的文字 */
offText?: ReactNode;
}
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<SwitchProps & Omit<React.HTMLAttributes<HTMLDivElement>, keyof SwitchProps> & React.RefAttributes<unknown>>>;
export default _default;