import { SwitchProps } from '@wakeadmin/element-adapter'; import { DefineAtomicProps } from '../../atomic'; export type ASwitchValue = string | number | boolean; export type ASwitchProps = DefineAtomicProps, { renderPreview?: (active: boolean) => any; /** * 默认同 activeText */ previewActiveText?: string; /** * 预览时 inactiveText */ previewInactiveText?: string; /** * switch 状态改变前的钩子, 返回 false 或者返回 Promise 且被 reject 则停止切换 * * 如果返回的是 Promise,switch 原件将会帮你维护 loading 状态 */ beforeChange?: (value?: ASwitchValue) => Promise | boolean; }>; declare global { interface AtomicProps { switch: ASwitchProps; } } export declare const ASwitchComponent: import("../../atomic").AtomicComponent; export declare const ASwitch: import("../../atomic").Atomic; //# sourceMappingURL=index.d.ts.map