工单组件
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user