delete and update a attachment in task
This commit is contained in:
@@ -73,13 +73,31 @@ const AttachmentItem: FC<Props> = ({ title, createdAt, type, url, onEdit, onDele
|
||||
</PopoverButton>
|
||||
|
||||
<PopoverPanel anchor="bottom end" className="z-[80] mt-1 rounded-[10px] bg-white shadow-md text-right p-3">
|
||||
<button type="button" onClick={onEdit} className="w-full text-sm text-right">
|
||||
ویرایش
|
||||
</button>
|
||||
{({ close }) => (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onEdit();
|
||||
close();
|
||||
}}
|
||||
className="w-full text-sm text-right"
|
||||
>
|
||||
ویرایش
|
||||
</button>
|
||||
|
||||
<button type="button" onClick={onDelete} className="w-full mt-3 text-sm text-right text-[#FF0000]">
|
||||
پاک کردن
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onDelete();
|
||||
close();
|
||||
}}
|
||||
className="w-full mt-3 text-sm text-right text-[#FF0000]"
|
||||
>
|
||||
پاک کردن
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</PopoverPanel>
|
||||
</Popover>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user