import { useDraggable } from '@dnd-kit/core'; function PaletteItem( { blockType, definition } ) { const { attributes, listeners, setNodeRef, isDragging } = useDraggable( { id: `palette-${ blockType }`, data: { type: 'palette', blockType }, } ); return (
Drag blocks onto the canvas
{ Object.entries( definitions ).map( ( [ type, def ] ) => (