import React from 'react'; import { Move, Pencil, Trash2 } from 'lucide-react'; import { GalleryImage } from '../../types'; interface GalleryGridProps { images: GalleryImage[]; onEdit: (image: GalleryImage) => void; onDelete: (id: string) => void; onReorder: (dragIndex: number, dropIndex: number) => void; } export function GalleryGrid({ images, onEdit, onDelete, onReorder }: GalleryGridProps) { return (
{images.map((image, index) => (
e.dataTransfer.setData('text/plain', index.toString())} onDragOver={(e) => e.preventDefault()} onDrop={(e) => { e.preventDefault(); const dragIndex = parseInt(e.dataTransfer.getData('text/plain')); onReorder(dragIndex, index); }} > {image.alt}
{image.caption}
))}
); }