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

---
 .../src/lib/reader/components/CloseReaderButton.svelte    | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

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

diff --git a/frontend/src/lib/reader/components/CloseReaderButton.svelte b/frontend/src/lib/reader/components/CloseReaderButton.svelte
index 0c88323..f3eb4ba 100644
--- a/frontend/src/lib/reader/components/CloseReaderButton.svelte
+++ b/frontend/src/lib/reader/components/CloseReaderButton.svelte
@@ -1,19 +1,22 @@
 <script lang="ts">
-	import { getReaderContext } from '$lib/Reader';
 	import { accelerator } from '$lib/Shortcuts';
+	import { getReaderContext } from '../Reader.svelte';
 
 	const reader = getReaderContext();
+
+	function onclick() {
+		reader.visible = false;
+		reader.sidebar = false;
+	}
 </script>
 
 <button
 	type="button"
 	class="btn floating"
 	title="Close reader"
-	on:click={() => {
-		$reader.visible = false;
-		$reader.sidebar = false;
-	}}
+	aria-label="Close reader"
+	{onclick}
 	use:accelerator={'Escape'}
 >
-	<span class="icon-lg icon-[material-symbols--close]" />
+	<span class="icon-lg icon-[material-symbols--close]"></span>
 </button>
-- 
cgit v1.2.3-2-gb3c3

