,
+ options: ToastOptions,
+) => {
+ toast.set({id, message, options})
+
+ setTimeout(() => popToast(id), options.timeout || 5000)
+
+ return id
+}
+
+export const popToast = (id: string) => toast.update($t => ($t?.id === id ? null : $t))
diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte
index aafb7f7..b3df4ba 100644
--- a/src/lib/components/Icon.svelte
+++ b/src/lib/components/Icon.svelte
@@ -8,18 +8,18 @@
diff --git a/svelte.config.js b/svelte.config.js
index 6695d41..7324633 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -14,10 +14,10 @@ const config = {
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
alias: {
- src: "src",
- app: "src/app",
- lib: "src/lib",
- assets: "src/assets",
+ '@src': "src",
+ '@app': "src/app",
+ '@lib': "src/lib",
+ '@assets': "src/assets",
},
},
}