From a059ee3c7c7c0b502eb4d796f3e42736cdb70a50 Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Sun, 26 Jun 2022 18:03:06 -0500
Subject: Icon on:click is now a parameter

---
 src/components/helpers/Icon.svelte | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/components/helpers/Icon.svelte')

diff --git a/src/components/helpers/Icon.svelte b/src/components/helpers/Icon.svelte
index eb430fb..7c96dd2 100644
--- a/src/components/helpers/Icon.svelte
+++ b/src/components/helpers/Icon.svelte
@@ -1,8 +1,11 @@
-<script>
+<script lang="ts">
     export let name;
     export let width = "1rem";
     export let height = "1rem";
     export let focusable = false;
+    export let handleClick = () => {
+        console.log("Default icon on:click function prints this");
+    };
     let icons = [
         {
             box: 24,
@@ -32,6 +35,7 @@
 </script>
 
 <svg
+    on:click={handleClick}
     class={$$props.class}
     xmlns="http://www.w3.org/2000/svg"
     fill="none"
-- 
cgit v1.2.3

