From 9fc2ab8cc848739a21bfa3f754e9bec4926dc034 Mon Sep 17 00:00:00 2001
From: Jacob Jenkins <jacob_jenkins@live.com>
Date: Thu, 14 Nov 2024 15:31:51 +0000
Subject: Update to svelte 5 (#12364)

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
---
 .../src/components/svelte/SvelteCounter.svelte            | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'examples/framework-multiple/src/components/svelte/SvelteCounter.svelte')

diff --git a/examples/framework-multiple/src/components/svelte/SvelteCounter.svelte b/examples/framework-multiple/src/components/svelte/SvelteCounter.svelte
index 01e58574a..641312ae1 100644
--- a/examples/framework-multiple/src/components/svelte/SvelteCounter.svelte
+++ b/examples/framework-multiple/src/components/svelte/SvelteCounter.svelte
@@ -2,7 +2,14 @@
 A counter written with Svelte
 -->
 <script lang="ts">
-	let count = 0;
+	import type { Snippet } from 'svelte';
+
+	interface Props {
+		children?: Snippet
+	}
+
+	let { children }: Props = $props();
+	let count = $state(0);
 
 	function add() {
 		count += 1;
@@ -14,10 +21,10 @@ A counter written with Svelte
 </script>
 
 <div class="counter">
-	<button on:click={subtract}>-</button>
+	<button onclick={subtract}>-</button>
 	<pre>{count}</pre>
-	<button on:click={add}>+</button>
+	<button onclick={add}>+</button>
 </div>
 <div class="counter-message">
-	<slot />
+	{@render children?.()}
 </div>
-- 
cgit v1.2.3

