import React from "react"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { X } from "lucide-react"; export default function AttachmentsDialog({ children, attachments, deleteFile, }: { children: React.ReactNode; attachments: File[] | []; deleteFile: (file: any) => void; }) { return ( {children} پیوست‌ها {attachments.length == 0 ? (
هیج پیوستی وجود ندارد.
) : (
{attachments?.map((item,index) => { return (
{index + 1}

{item.name}

deleteFile(item.name)} className=" cursor-pointer hover:drop-shadow-md" />
); })}
)}
); }