import React, { FC } from 'react'; import { FlexProps } from '@chakra-ui/react'; import { ButtonProps } from '../button'; interface confirmModalType { /** 取消的二次确认标题 */ title?: string; /** 取消的二次确认内容 */ content?: string; /** 取消的二次确认的 ok 按钮文字 */ okText?: string; /** 取消的二次确认的 cancel 按钮文字 */ cancelText?: string; /** 取消的二次确认的 ok 按钮 props */ okButtonProps?: ButtonProps; /** 取消的二次确认的 cancel 按钮 props */ cancelButtonProps?: ButtonProps; } export interface ContextualSaveBarProps extends FlexProps { /** 左上角区域 */ logo?: React.ReactNode; /** 保存条中间显示的文字 */ title?: string; /** 保存按钮文字 */ okText?: string; /** 保存按钮属性 */ okButtonProps?: ButtonProps; /** 取消按钮属性 */ cancelButtonProps?: ButtonProps; /** 取消按钮文字 */ cancelText?: string; /** 取消保存的二次确认 Modal 的属性 */ cancelConfirmModal?: confirmModalType; /** 离开页面的二次确认 Modal 的属性 */ leaveConfirmModal?: confirmModalType; /** 保存回调 */ onOK?: () => void; /** 取消回调 */ onCancel?: () => void; /** 当 visible 为 true 时,离开页面的回调,参数 path 为要跳转的路由 */ onLeave?: (path: string) => void; } declare const ContextualSaveBar: FC; export default ContextualSaveBar;