fix(ui): portal album menu and close previous overlays

This commit is contained in:
vicrodh committed 2026-01-14 02:27:34 -06:00
1 parent 8a570e7fd9
commit b397555bdc
2 files changed
+50 -7

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<script lang="ts">
import { onMount } from 'svelte';
export let target: HTMLElement;
let container: HTMLDivElement | null = null;
onMount(() => {
if (!container || !target) return;
target.appendChild(container);
return () => {
if (container?.parentNode) {
container.parentNode.removeChild(container);
}
};
});
</script>
<div bind:this={container} class="portal-root">
<slot />
</div>
<style>
.portal-root {
display: contents;
}
</style>