/** * Switch Component - Lynx 版 MUI Switch * 100% 一比一复刻 MUI Switch * * 开关组件,使用 CSS transition 实现滑动动画 * * 对应 MUI: packages/mui-material/src/Switch/Switch.js */ import './Switch.css'; import switchClasses, { getSwitchUtilityClass } from './switchClasses'; export { switchClasses, getSwitchUtilityClass }; export type SwitchColor = 'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning'; export type SwitchSize = 'small' | 'medium'; export type SwitchEdge = 'start' | 'end'; export interface SwitchProps { /** 自定义类名 */ className?: string; /** 样式类覆盖 */ classes?: Partial; /** 是否选中 */ checked?: boolean; /** 默认是否选中 */ defaultChecked?: boolean; /** 是否禁用 */ disabled?: boolean; /** 是否禁用涟漪 */ disableRipple?: boolean; /** 边缘位置 */ edge?: SwitchEdge; /** ID 属性 */ id?: string; /** 传递给 input 元素的 props */ inputProps?: Record; /** input 元素的 ref */ inputRef?: any; /** name 属性 */ name?: string; /** 是否必填 */ required?: boolean; /** 颜色 - 默认 primary */ color?: SwitchColor; /** 尺寸 */ size?: SwitchSize; /** 内联样式 */ style?: Record; /** sx 属性 */ sx?: Record; /** 值 */ value?: string; /** 点击事件 */ bindtap?: (event?: any) => void; onChange?: (event: any, checked: boolean) => void; } export declare function Switch(props: SwitchProps): JSX.Element; export default Switch; //# sourceMappingURL=index.d.ts.map