0df8aa77d9
- 员工花名册管理(加密存储、导入导出) - 薪酬管理(发薪批次、薪酬模版、加班费计算、工资条) - 社保公积金(多城市配置、版本管理、基数调整) - 解聘管理(6步流程、证据链、工作交接) - AI 助手(合同审查、风险预测、RAG 知识库) - Dashboard 仪表盘 - 设置与通知
39 lines
950 B
TypeScript
39 lines
950 B
TypeScript
import Modal from './Modal'
|
|
import Button from './Button'
|
|
|
|
interface ConfirmDialogProps {
|
|
open: boolean
|
|
title: string
|
|
message: string
|
|
confirmLabel?: string
|
|
cancelLabel?: string
|
|
variant?: 'danger' | 'primary'
|
|
onConfirm: () => void
|
|
onCancel: () => void
|
|
}
|
|
|
|
/**
|
|
* 二次确认弹窗组件
|
|
* 用于危险操作(删除、归档、批量操作等)的二次确认
|
|
*/
|
|
export default function ConfirmDialog({
|
|
open,
|
|
title,
|
|
message,
|
|
confirmLabel = '确认',
|
|
cancelLabel = '取消',
|
|
variant = 'danger',
|
|
onConfirm,
|
|
onCancel,
|
|
}: ConfirmDialogProps) {
|
|
return (
|
|
<Modal open={open} onClose={onCancel} title={title} size="sm">
|
|
<p className="text-sm text-gray-600 mb-4">{message}</p>
|
|
<div className="flex justify-end gap-2">
|
|
<Button variant="secondary" onClick={onCancel}>{cancelLabel}</Button>
|
|
<Button variant={variant} onClick={onConfirm}>{confirmLabel}</Button>
|
|
</div>
|
|
</Modal>
|
|
)
|
|
}
|