implement onSelectionChanged
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user