Added seperate portal to put dom elements inside the flow
This commit is contained in:
@@ -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';
|
||||
Reference in New Issue
Block a user