implement onSelectionChanged

This commit is contained in:
peterkogo
2025-04-30 20:32:06 +02:00
parent adb13e261d
commit 47f9118296
13 changed files with 108 additions and 11 deletions
@@ -2,9 +2,9 @@
import { portal } from '$lib/actions/portal';
import type { ViewportPortalProps } from './types';
let { moveTo = 'front', children, ...rest }: ViewportPortalProps = $props();
let { target = 'front', children, ...rest }: ViewportPortalProps = $props();
</script>
<div use:portal={`viewport-${moveTo}`} {...rest}>
<div use:portal={`viewport-${target}`} {...rest}>
{@render children?.()}
</div>
@@ -2,6 +2,6 @@ import type { Snippet } from 'svelte';
import type { HTMLAttributes } from 'svelte/elements';
export type ViewportPortalProps = {
moveTo: 'front' | 'back';
target: 'front' | 'back';
children?: Snippet;
} & HTMLAttributes<HTMLDivElement>;