Add ability to drag new blocks into app preview

This commit is contained in:
Andrew Kingston 2022-10-17 08:46:09 +01:00
parent 3325b7b62b
commit 6656a89f18
1 changed files with 3 additions and 0 deletions

View File

@ -240,8 +240,11 @@
<Layout noPadding gap="XS">
{#each blocks as block}
<div
draggable="true"
class="component"
on:click={() => addComponent(block.component)}
on:dragstart={() => onDragStart(block.component)}
on:dragend={onDragEnd}
>
<Icon name={block.icon} />
<Body size="XS">{block.name}</Body>