chore(web): move BaseModal to callback pattern (#8696)

* chore(web): move BaseModal to callback to close

* chore: add question mark
This commit is contained in:
Ben 2024-04-11 09:01:16 +00:00 committed by GitHub
parent 8c9a092561
commit 37eea2d353
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 37 additions and 45 deletions

View file

@ -16,10 +16,10 @@
const dispatch = createEventDispatcher<{
newAlbum: string;
album: AlbumResponseDto;
close: void;
}>();
export let shared: boolean;
export let onClose: () => void;
onMount(async () => {
albums = await getAllAlbums({ shared: shared || undefined });
@ -52,7 +52,7 @@
};
</script>
<BaseModal id="album-selection-modal" title={getTitle()} on:close>
<BaseModal id="album-selection-modal" title={getTitle()} {onClose}>
<div class="mb-2 flex max-h-[400px] flex-col">
{#if loading}
{#each { length: 3 } as _}