feat: move toasts to top center to not obstruct menu

This commit is contained in:
Sam 2023-03-30 00:31:23 +02:00
parent c98e4390b1
commit a49dd09013
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
2 changed files with 1 additions and 3 deletions

View file

@ -17,8 +17,6 @@ let maxId = 0;
export const addToast = (data: ToastData) => {
const id = maxId++;
console.log(id);
toastStore.update((toasts) => (toasts = [...toasts, { ...data, id }]));
if (data.duration !== -1) {

View file

@ -29,7 +29,7 @@
<Navigation />
<div class="container">
<slot />
<div class="position-absolute top-0 end-0">
<div class="position-absolute top-0 start-50 translate-middle-x">
{#each $toastStore as toast}
<Toast header={toast.header} body={toast.body} />
{/each}