import type { MouseEvent } from 'react' export interface ContinueLearningModalProps { /** 是否可见 */ visible?: boolean /** 标题 */ title?: string /** 提示正文 */ message?: string /** 继续按钮文案 */ continueText?: string /** 取消按钮文案 */ cancelText?: string /** 点击「继续学习」回调 */ onContinue?: () => void /** 点击「取消」或遮罩回调 */ onCancel?: () => void } /** * ContinueLearningModal - 「未完成,是否继续学习」二选一确认弹窗 * 纯 CSS 实现,暖纸 + 朱红 + 金线古籍风,不依赖图片素材。 */ const ContinueLearningModal = ({ visible = true, title = '温馨提示', message = '你还没有完成本故居的学习,是否继续上次的进度?', continueText = '继续学习', cancelText = '取消', onContinue, onCancel, }: ContinueLearningModalProps) => { if (!visible) return null const swallow = (e: MouseEvent) => { e.preventDefault() e.stopPropagation() } return (
{message}
{/* 按钮组 */}