工单组件
Build and Release / Build (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled

This commit is contained in:
2026-05-01 17:09:24 +03:00
parent 7400137b3c
commit 644b20ebef
2 changed files with 120 additions and 18 deletions
+8 -2
View File
@@ -17,7 +17,7 @@ import type { ReactNode } from "react";
interface ConfirmationButtonProps {
trigger: ReactNode;
title: string;
description: string;
description: ReactNode;
onConfirm: () => void | Promise<void>;
cancelText?: string;
confirmText?: string;
@@ -36,7 +36,13 @@ export const ConfirmButton: React.FC<ConfirmationButtonProps> = ({
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{title}</AlertDialogTitle>
<AlertDialogDescription>{description}</AlertDialogDescription>
<AlertDialogDescription asChild>
{typeof description === "string" ? (
<span>{description}</span>
) : (
<div>{description}</div>
)}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>{cancelText}</AlertDialogCancel>