refactor: only include template in share url if it's custom

This commit is contained in:
Lewis Wynne 2026-03-23 19:26:45 +00:00
parent bb429d8195
commit be11c0e57a
6 changed files with 249 additions and 32 deletions

View file

@ -0,0 +1,25 @@
<script lang="ts">
let { onClose, children }: { onClose: () => void; children: any } = $props();
function handleKeydown(e: KeyboardEvent) {
if (e.key === 'Escape') onClose();
}
</script>
<svelte:window onkeydown={handleKeydown} />
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="fixed inset-0 z-50 flex items-center justify-center"
onmousedown={onClose}
>
<div class="absolute inset-0 bg-black/50"></div>
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="relative rounded-lg shadow-xl max-w-md w-full mx-4 p-6"
style="background: var(--bg-card); color: var(--text);"
onmousedown={(e) => e.stopPropagation()}
>
{@render children()}
</div>
</div>