import { useDraggable } from '@dnd-kit/core'; function PaletteItem( { blockType, definition } ) { const { attributes, listeners, setNodeRef, isDragging } = useDraggable( { id: `palette-${ blockType }`, data: { type: 'palette', blockType }, } ); return (
{ definition.label }
); } export default function BlockPalette( { definitions } ) { return (

Content Blocks

Drag blocks onto the canvas

{ Object.entries( definitions ).map( ( [ type, def ] ) => ( ) ) }
); }