import { CSSProperties, ReactNode, HTMLAttributes } from 'react';
import { type SizeType } from '../config-provider';
/**
* @title Switch
*/
export interface SwitchProps extends Omit, 'className' | 'onChange'> {
style?: CSSProperties;
className?: string | string[];
/**
* 是否禁用
*/
disabled?: boolean;
/**
* 静态展示只读
*/
quickStatic?: boolean;
/**
* 点击开关的回调
*/
onChange?: (value: boolean, event: any) => void;
/**
* 开关的尺寸,有 `small` 和 `default` 可供选择。
*/
size?: SizeType;
/**
* 三种样式类型
*/
type?: 'circle' | 'round' | 'line';
/**
* 开关打开时的文案,small 尺寸不生效。
*/
checkedText?: ReactNode;
/**
* 开关关闭时的文案,small 尺寸不生效。
*/
uncheckedText?: ReactNode;
/**
* 开关关闭时,按钮上显示的图标
*/
uncheckedIcon?: ReactNode;
/**
* 开关打开时,按钮上显示的图标
*/
checkedIcon?: ReactNode;
/**
* 默认是否选中
*/
defaultChecked?: boolean;
/**
* 开关是否打开
*/
checked?: boolean;
/**
* 兼容checked
*/
value?: boolean;
/**
* 加载中状态
*/
loading?: boolean;
children?: ReactNode;
}