Holds tiles and the zones they go in. A tile is moved by dragging it to a zone, or by tapping it and then the zone; either way onDrop is told. Put DragTiles and DropZones anywhere inside.
onDrop
DragTile
DropZone
<DragDropArea onDrop={(tile, zone) => put(tile, zone)}> <DropZone id="answer" label="Answer">{placed && <DragTile id={placed} label={placed}>…</DragTile>}</DropZone> {bank.map((id) => <DragTile key={id} id={id} label={id}>…</DragTile>)}</DragDropArea> Copy
<DragDropArea onDrop={(tile, zone) => put(tile, zone)}> <DropZone id="answer" label="Answer">{placed && <DragTile id={placed} label={placed}>…</DragTile>}</DropZone> {bank.map((id) => <DragTile key={id} id={id} label={id}>…</DragTile>)}</DragDropArea>
Holds tiles and the zones they go in. A tile is moved by dragging it to a zone, or by tapping it and then the zone; either way
onDropis told. PutDragTiles andDropZones anywhere inside.