From 71d37e758fbc155a14f13989e7ed05e7719c2159 Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Sat, 20 Aug 2022 19:55:21 +0200
Subject: implement LinkButton component

---
 web/pw-server/src/lib/components/LinkButton.svelte | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 web/pw-server/src/lib/components/LinkButton.svelte

(limited to 'web/pw-server/src/lib/components/LinkButton.svelte')

diff --git a/web/pw-server/src/lib/components/LinkButton.svelte b/web/pw-server/src/lib/components/LinkButton.svelte
new file mode 100644
index 0000000..0d0e7d6
--- /dev/null
+++ b/web/pw-server/src/lib/components/LinkButton.svelte
@@ -0,0 +1,7 @@
+<script lang="ts">
+  export let href: string | null;
+
+  $: isDisabled = !href;
+</script>
+
+<a class="btn" class:btn-disabled={isDisabled} {href}><slot /></a>
-- 
cgit v1.2.3

