INIT
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { boxWith } from "svelte-toolbelt";
|
||||
import type { PresenceLayerImplProps } from "./types.js";
|
||||
import { Presence } from "./presence.svelte.js";
|
||||
|
||||
let { open, forceMount, presence, ref }: PresenceLayerImplProps = $props();
|
||||
|
||||
const presenceState = new Presence({
|
||||
open: boxWith(() => open),
|
||||
ref,
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if forceMount || open || presenceState.isPresent}
|
||||
{@render presence?.({ present: presenceState.isPresent })}
|
||||
{/if}
|
||||
Reference in New Issue
Block a user