Add ability to drag new blocks into app preview
This commit is contained in:
parent
0e83bcfe9e
commit
0378e06550
|
@ -240,8 +240,11 @@
|
||||||
<Layout noPadding gap="XS">
|
<Layout noPadding gap="XS">
|
||||||
{#each blocks as block}
|
{#each blocks as block}
|
||||||
<div
|
<div
|
||||||
|
draggable="true"
|
||||||
class="component"
|
class="component"
|
||||||
on:click={() => addComponent(block.component)}
|
on:click={() => addComponent(block.component)}
|
||||||
|
on:dragstart={() => onDragStart(block.component)}
|
||||||
|
on:dragend={onDragEnd}
|
||||||
>
|
>
|
||||||
<Icon name={block.icon} />
|
<Icon name={block.icon} />
|
||||||
<Body size="XS">{block.name}</Body>
|
<Body size="XS">{block.name}</Body>
|
||||||
|
|
Loading…
Reference in New Issue