Skip to content

Commit 21846fd

Browse files
committed
Create IsRunningExternal.svelte
1 parent d8f8bf4 commit 21846fd

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script lang="ts">
2+
import { IS_RUNNING_EXTERNAL} from '$lib/detection/onwebsite';
3+
import type { Snippet } from 'svelte';
4+
let { children, not = false }: { children?: Snippet; not?: boolean } = $props();
5+
</script>
6+
7+
{#if IS_RUNNING_EXTERNAL}
8+
{#if !not}
9+
{@render children?.()}
10+
{/if}
11+
{:else if not}
12+
{@render children?.()}
13+
{/if}

0 commit comments

Comments
 (0)