diff --git a/src/lib/components/visual/Toast.svelte b/src/lib/components/visual/Toast.svelte
index 351df0d..15c9ce8 100644
--- a/src/lib/components/visual/Toast.svelte
+++ b/src/lib/components/visual/Toast.svelte
@@ -23,19 +23,22 @@
let { id, type, message, durations }: Props = $props();
- const color = {
+ const colors = {
success: "purple",
error: "red",
info: "blue",
warning: "pink",
- }[type];
+ };
- const Icon = {
+ const Icons = {
success: CheckIcon,
error: BanIcon,
info: InfoIcon,
warning: TriangleAlert,
- }[type];
+ };
+
+ let color = $derived(colors[type]);
+ let Icon = $derived(Icons[type]);
// intentionally unused. this is so tailwind can generate the css for these colours as it doesn't detect if it's dynamically loaded
// this would lead to the colours not being generated in the final css file by tailwind
@@ -48,7 +51,7 @@