feat: move toasts to top center to not obstruct menu
This commit is contained in:
parent
c98e4390b1
commit
a49dd09013
2 changed files with 1 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue