From 6d4e9ae6ce4ad2f06a4bfca3d810c0b68269e89f Mon Sep 17 00:00:00 2001 From: manoa <amanoa@neogeo.fr> Date: Wed, 10 May 2023 14:38:00 +0300 Subject: [PATCH] add option button --- src/components/core/Button.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/core/Button.tsx b/src/components/core/Button.tsx index c667047..dab3b93 100644 --- a/src/components/core/Button.tsx +++ b/src/components/core/Button.tsx @@ -9,10 +9,19 @@ interface Props { className?: string style?: "outline" | undefined color?: "primary" | "secondary" | undefined + options?: any } const Button = (props: Props) => { - const { children, name = "", url = "#", className, style, color } = props + const { + children, + name = "", + url = "#", + className, + style, + color, + options, + } = props const isPrimary = color === "primary" const isSecondary = color === "secondary" @@ -26,7 +35,8 @@ const Button = (props: Props) => { isPrimary && "btn-primary", isSecondary && "btn-secondary", isOutline && "btn-outline", - className + className, + options?.action )} > {name} -- GitLab