From 8886308c56223f04df535a065234414a6deb11ba Mon Sep 17 00:00:00 2001
From: Maksymilian <maks@jopek.eu>
Date: Fri, 23 Sep 2022 09:44:56 +0200
Subject: Initial commit, v1.0.0

---
 src/lib/Counter.svelte | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 src/lib/Counter.svelte

(limited to 'src/lib/Counter.svelte')

diff --git a/src/lib/Counter.svelte b/src/lib/Counter.svelte
new file mode 100644
index 0000000..e417505
--- /dev/null
+++ b/src/lib/Counter.svelte
@@ -0,0 +1,12 @@
+<script>
+  import { getStore } from './hmr-stores';
+  export let id;
+  const count = getStore(id, 0);
+  export const increment = () => {
+    $count += 1
+  };
+</script>
+
+<button class="px-8 py-4 w-52 text-red-500 bg-red-200 rounded-full" {id} on:click={increment}>
+  Clicks: {$count}
+</button>
\ No newline at end of file
-- 
cgit v1.3.1

