From aa40c16a21e5ae6a58e9e2eba9031a5c536343dd Mon Sep 17 00:00:00 2001 From: theoleuthardt Date: Thu, 13 Feb 2025 01:08:53 +0100 Subject: [PATCH] feat: optimized button component for reusability --- src/components/Button.tsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 05f1076..f5d2637 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,19 +1,28 @@ -"use client"; import React from "react"; interface ButtonProps { className?: string; content: string; - onClick?: Function; + onClick?: () => void; + visible?: boolean; } -const Button = (props: ButtonProps) => { +const Button = ({ + className, + content, + onClick, + visible = true, +}: ButtonProps) => { return ( ); };