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/Expander.svelte | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

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

diff --git a/frontend/src/lib/components/Expander.svelte b/frontend/src/lib/components/Expander.svelte
index a382658..8f23042 100644
--- a/frontend/src/lib/components/Expander.svelte
+++ b/frontend/src/lib/components/Expander.svelte
@@ -1,17 +1,21 @@
 <script lang="ts">
-	export let expanded: boolean;
-	export let title: string;
+	interface Props {
+		expanded: boolean;
+		title: string;
+	}
+
+	let { expanded = $bindable(), title }: Props = $props();
+
+	function onclick() {
+		expanded = !expanded;
+	}
 </script>
 
-<button
-	class="flex items-center text-base hover:text-white"
-	type="button"
-	on:click={() => (expanded = !expanded)}
->
+<button class="flex items-center text-base hover:text-white" type="button" {onclick}>
 	{#if expanded}
-		<span class="icon-base icon-[material-symbols--expand-less]" />
+		<span class="icon-base icon-[material-symbols--expand-less]"></span>
 	{:else}
-		<span class="icon-base icon-[material-symbols--expand-more]" />
+		<span class="icon-base icon-[material-symbols--expand-more]"></span>
 	{/if}
 	{title}
 </button>
-- 
cgit v1.2.3-2-gb3c3

