fix: make "Remove Collection" consistent with "Remove Workspace" (#7750)

This commit is contained in:
prateek-bruno
2026-04-28 11:14:08 +05:30
committed by GitHub
parent 87aefe9849
commit ac2cff90f0
2 changed files with 1 additions and 17 deletions

View File

@@ -36,19 +36,11 @@ const DeleteCollection = ({ onClose, collectionUid, workspaceUid }) => {
return null;
}
const customHeader = (
<div className="flex items-center gap-2">
<IconAlertTriangle size={18} strokeWidth={1.5} className="text-red-500" />
<span>Delete Collection</span>
</div>
);
return (
<StyledWrapper>
<Modal
size="sm"
title="Delete Collection"
customHeader={customHeader}
confirmText="Delete"
cancelText="Cancel"
confirmButtonColor="danger"

View File

@@ -43,22 +43,14 @@ const RemoveCollection = ({ onClose, collectionUid }) => {
return <ConfirmCollectionCloseDrafts onClose={onClose} collection={collection} collectionUid={collectionUid} />;
}
const customHeader = (
<div className="flex items-center gap-2" data-testid="close-collection-modal-title">
<IconAlertCircle size={18} strokeWidth={1.5} className="warning-icon" />
<span>Remove Collection</span>
</div>
);
// Otherwise, show the standard remove confirmation modal
return (
<StyledWrapper>
<Modal
size="sm"
title="Remove Collection"
customHeader={customHeader}
confirmText="Remove"
confirmButtonColor="warning"
confirmButtonColor="danger"
handleConfirm={onConfirm}
handleCancel={onClose}
>