From dc4db405d2991d3ec6a114f3b08d3fccd057d3ee Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 13 Feb 2025 17:52:16 +0100
Subject: frontend: Migrate to Svelte 5

---
 frontend/src/lib/components/DeleteButton.svelte | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'frontend/src/lib/components/DeleteButton.svelte')

diff --git a/frontend/src/lib/components/DeleteButton.svelte b/frontend/src/lib/components/DeleteButton.svelte
index 8f5f116..bc94c8c 100644
--- a/frontend/src/lib/components/DeleteButton.svelte
+++ b/frontend/src/lib/components/DeleteButton.svelte
@@ -1,15 +1,22 @@
-<script>
+<script lang="ts">
 	import { accelerator } from '$lib/Shortcuts';
+	import type { MouseEventHandler } from 'svelte/elements';
 
-	export let prominent = false;
+	interface Props {
+		prominent?: boolean;
+		onclick: MouseEventHandler<HTMLButtonElement>;
+	}
+
+	let { prominent = false, onclick }: Props = $props();
 </script>
 
 <button
 	type="button"
 	class={prominent ? 'btn-rose' : 'btn-slate hover:bg-rose-700'}
 	title="Delete forever"
-	on:click
+	aria-label="Delete forever"
+	{onclick}
 	use:accelerator={'Delete'}
 >
-	<span class="icon-base icon-[material-symbols--delete-forever]" />
+	<span class="icon-base icon-[material-symbols--delete-forever]"></span>
 </button>
-- 
cgit v1.2.3-2-gb3c3

