Adds CollectionEditModal and CollectionDeleteModal for the collection detail page. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1.5 KiB
JavaScript
46 lines
1.5 KiB
JavaScript
import { collectionDisplayName } from '../lib/collection-vocabulary.js';
|
|
|
|
export default function CollectionDeleteModal({
|
|
isOpen,
|
|
collection,
|
|
onClose,
|
|
onConfirm,
|
|
}) {
|
|
if (!isOpen || !collection) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
<div className="card max-w-md w-full mx-4">
|
|
<h2 className="text-2xl font-bold mb-4" style={{ color: 'var(--text-primary)' }}>
|
|
Delete List
|
|
</h2>
|
|
<p className="mb-6" style={{ color: 'var(--text-secondary)' }}>
|
|
Are you sure you want to delete "{collectionDisplayName(collection)}"? This action
|
|
cannot be undone and will permanently remove all cards and data associated with this list.
|
|
</p>
|
|
<div className="flex space-x-3">
|
|
<button
|
|
type="button"
|
|
onClick={onClose}
|
|
className="flex-1 py-2 px-4 rounded-xl border transition-colors"
|
|
style={{
|
|
borderColor: 'var(--border)',
|
|
color: 'var(--text-secondary)',
|
|
}}
|
|
>
|
|
Cancel
|
|
</button>
|
|
<button
|
|
type="button"
|
|
onClick={onConfirm}
|
|
className="flex-1 py-2 px-4 rounded-xl font-medium transition-all duration-200 hover:shadow-md bg-red-600 text-white hover:bg-red-700"
|
|
>
|
|
Delete List
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|