feat: move toasts to top center to not obstruct menu
This commit is contained in:
parent
c98e4390b1
commit
a49dd09013
|
@ -17,8 +17,6 @@ let maxId = 0;
|
||||||
export const addToast = (data: ToastData) => {
|
export const addToast = (data: ToastData) => {
|
||||||
const id = maxId++;
|
const id = maxId++;
|
||||||
|
|
||||||
console.log(id);
|
|
||||||
|
|
||||||
toastStore.update((toasts) => (toasts = [...toasts, { ...data, id }]));
|
toastStore.update((toasts) => (toasts = [...toasts, { ...data, id }]));
|
||||||
|
|
||||||
if (data.duration !== -1) {
|
if (data.duration !== -1) {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<Navigation />
|
<Navigation />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<slot />
|
<slot />
|
||||||
<div class="position-absolute top-0 end-0">
|
<div class="position-absolute top-0 start-50 translate-middle-x">
|
||||||
{#each $toastStore as toast}
|
{#each $toastStore as toast}
|
||||||
<Toast header={toast.header} body={toast.body} />
|
<Toast header={toast.header} body={toast.body} />
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Reference in New Issue