From 39b677404558ae3b7eb34e818d7ca308f62f9cb0 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 28 Oct 2024 15:32:46 -0700
Subject: feat: update to svelte 5

---
 src/lib/Notification/Notification.svelte | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

(limited to 'src/lib/Notification/Notification.svelte')

diff --git a/src/lib/Notification/Notification.svelte b/src/lib/Notification/Notification.svelte
index 6764f46e..f2b6ac44 100644
--- a/src/lib/Notification/Notification.svelte
+++ b/src/lib/Notification/Notification.svelte
@@ -1,12 +1,18 @@
 <script lang="ts">
+  import { preventDefault } from 'svelte/legacy';
+
   import settings from '$stores/settings';
   import { onMount } from 'svelte';
 
-  export let notification: { [key: string]: any } = {};
-  export let onRemove: () => void = () => {
+  interface Props {
+    notification?: { [key: string]: any };
+    onRemove?: () => void;
+    removed?: boolean;
+  }
+
+  let { notification = {}, onRemove = () => {
     return;
-  };
-  export let removed = false;
+  }, removed = $bindable(false) }: Props = $props();
 
   onMount(() => setTimeout(remove, notification.duration));
 
@@ -21,20 +27,20 @@
   <div
     id="notification-container"
     class={removed ? 'fade-out' : 'fade-in'}
-    on:click={remove}
-    on:keydown={() => {
+    onclick={remove}
+    onkeydown={() => {
       return;
     }}
     role="button"
     tabindex="0"
   >
     {#if notification.description}
-      <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
+      <!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
       <details
         open
         id="notification"
-        on:click|preventDefault={(event) => event.preventDefault()}
-        on:keydown={() => {
+        onclick={preventDefault((event) => event.preventDefault())}
+        onkeydown={() => {
           return;
         }}
       >
-- 
cgit v1.2.3

