From 2603585436162d381a3de2c71735048f69d1196e Mon Sep 17 00:00:00 2001 From: Jacopo Gasparetto <jacopo.gasparetto@cnaf.infn.it> Date: Wed, 12 Apr 2023 17:14:20 +0200 Subject: [PATCH] Add onClick callback prop --- frontend/src/components/Button.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/components/Button.tsx b/frontend/src/components/Button.tsx index 47ddb49..6f8a0fe 100644 --- a/frontend/src/components/Button.tsx +++ b/frontend/src/components/Button.tsx @@ -4,6 +4,7 @@ interface ButtonProps { type?: "button" | "reset" | "submit" title: string, icon?: ReactNode + onClick?: () => void } export const Button = (props: ButtonProps) => { @@ -11,6 +12,7 @@ export const Button = (props: ButtonProps) => { <button className="border rounded p-4 hover:bg-neutral-200" type={props.type} + onClick={props.onClick} > <div className="flex"> {props.icon ? -- GitLab