mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
fix: make "Remove Collection" consistent with "Remove Workspace" (#7750)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user