From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001
From: Martial Simon <msimon_fr@hotmail.com>
Date: Mon, 15 Sep 2025 01:07:58 +0200
Subject: add: added projects

---
 ping/frontend/src/lib/components/Button.svelte | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 ping/frontend/src/lib/components/Button.svelte

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

diff --git a/ping/frontend/src/lib/components/Button.svelte b/ping/frontend/src/lib/components/Button.svelte
new file mode 100644
index 0000000..54b26ab
--- /dev/null
+++ b/ping/frontend/src/lib/components/Button.svelte
@@ -0,0 +1,17 @@
+<script lang="ts">
+	// Accept props and ensure onclick matches the expected event handler signature
+	const {
+		href = undefined as string | undefined,
+		onclick = undefined as
+			| ((event: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement }) => void)
+			| undefined,
+		disabled = false,
+		children
+	} = $props();
+</script>
+
+{#if href}
+	<a class="btn" {href}>{@render children?.()}</a>
+{:else}
+	<button class="btn" {onclick} {disabled}>{@render children?.()}</button>
+{/if}
-- 
cgit v1.2.3

