import {FunctionComponent, ReactNode, RefObject} from 'react' export interface PopupActionProps { open: () => void close: () => void } /** * @title Popup Props */ export interface PopupProps { ref: RefObject children: ReactNode /** * @description 允许关闭弹窗 * @default true */ enableClose?: boolean /** * @description 确认文字 * @default '完成' */ confirmText?: string /** * @description 确认文字颜色 * @default '#007AFF' */ confirmColor?: string /** * @description 确认回调 */ onConfirm?: () => void | Promise /** * @description 确认回调,用来判断是否自动关闭 */ closeAfterConfirm?: boolean /** * @description 取消回调,用来判断是否自动关闭 */ closeAfterCancel?: boolean /** * @description 取消文字 * @default '取消' */ cancelText?: string /** * @description 取消文字颜色 * @default '#007AFF' */ cancelColor?: string /** * @description 取消回调,resolve之后会自动关闭 */ onCancel?: () => void /** * @description 关闭回调,关闭之后触发 */ onClose?: () => void /** * @description 标题 */ title?: ReactNode /** * @description 最小高度,按375的尺寸给,要用来计算 * @default 220 */ minHeight?: number /** * @description 背景色 * @default '#ffffff' */ backgroundColor?: string /** * @description 关闭按钮的位置 * @default 'right' */ closePosition?: 'left' | 'right' clearColor?: string titleColor?: string safeAreaPosition?: 'bottom' | 'top' | 'none' } declare const Popup: FunctionComponent export {Popup}