import * as React from 'react'; import { CnBalloonProps } from '@alife/cn-ui/es/components/cn-balloon/index'; import './index.scss'; type ChangeEvent = KeyboardEvent | React.MouseEvent; export type SwitchChangeEventHandler = (checked: boolean, event?: ChangeEvent) => void; export interface SwitchProps { /** 按钮文字 */ text?: string; /** 快捷键 */ hotKey?: string; size?: 'small' | 'medium'; /** 点击按钮触发函数 */ onChange?: SwitchChangeEventHandler; /** 开关值 */ value?: boolean; /** 是否只读 */ readOnly?: boolean; /** 表示开关被禁用 */ disabled?: boolean; /** 自定义类名 */ className?: string; /** 自定义内联样式 */ style?: React.CSSProperties; /** 气泡提示 */ balloon?: CnBalloonProps; } export default function Switch(props: SwitchProps): React.JSX.Element; export {};