refactor(svelte): add slot to controls, cleanup ControlButton types closes #3788

This commit is contained in:
moklick
2024-01-15 17:00:16 +01:00
parent 0fe2f2ae53
commit 4d8fc79d21
4 changed files with 31 additions and 8 deletions
@@ -74,6 +74,7 @@
data-testid="svelte-flow__controls"
aria-label={ariaLabel ?? 'Svelte Flow controls'}
>
<slot name="before" />
{#if showZoom}
<ControlButton
on:click={onZoomInHandler}
@@ -118,4 +119,6 @@
{#if isInteractive}<UnlockIcon />{:else}<LockIcon />{/if}
</ControlButton>
{/if}
<slot />
<slot name="after" />
</Panel>