import type { ReactNode } from "react"; import { X } from "lucide-react"; import { Button } from "./Button"; // Dialog 轻量模态:遮罩 + 居中卡片。open=false 不渲染。 export function Dialog({ open, onClose, title, children, footer, }: { open: boolean; onClose: () => void; title: string; children: ReactNode; footer?: ReactNode; }) { if (!open) return null; return (
e.stopPropagation()} >

{title}

{children}
{footer &&
{footer}
}
); } // ConfirmFooter 常用的取消/确认按钮组。 export function ConfirmFooter({ onCancel, onConfirm, confirmLabel = "确认", danger }: { onCancel: () => void; onConfirm: () => void; confirmLabel?: string; danger?: boolean }) { return ( <> ); }