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 (
{/* 遮罩 */}
{/* 哑光米纸卡片 */}
{/* 内层细金线描边 */}
{/* 标题 */}
{title}
{/* 菱形分隔线 */}
{/* 正文 */}

{message}

{/* 按钮组 */}
{/* 取消(次要:米底描边) */} {/* 继续学习(主要:朱红渐变 + 金边) */}
) } export default ContinueLearningModal