Added seperate portal to put dom elements inside the flow

This commit is contained in:
peterkogo
2023-12-14 13:51:25 +01:00
parent 58ad111ec3
commit cc7c49223b
5 changed files with 34 additions and 1 deletions
@@ -0,0 +1,12 @@
<script lang="ts">
import portal from '$lib/actions/portal';
import { useStore } from '$lib/store';
type $$Props = {};
const { domNode } = useStore();
</script>
<div use:portal={{ target: '.svelte-flow__view-portal', domNode: $domNode }}>
<slot />
</div>
@@ -0,0 +1 @@
export { default as ViewPortal } from './ViewPortal.svelte';