From 1b07a760e5b1394c036ae212403f49d2a631d4fb Mon Sep 17 00:00:00 2001 From: ductinhkzz <54934640+ductinhkzz@users.noreply.github.com> Date: Mon, 22 May 2023 22:20:35 +0700 Subject: [PATCH] fix(button.tsx): make prop theme work (#746) fix(button.tsx): fix: make prop theme work Co-authored-by: Tinh Le Duc --- src/lib/components/Button/Button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/Button/Button.tsx b/src/lib/components/Button/Button.tsx index a22b34228..a21b5c15f 100644 --- a/src/lib/components/Button/Button.tsx +++ b/src/lib/components/Button/Button.tsx @@ -104,7 +104,8 @@ const ButtonComponent = forwardRef { - const { buttonGroup: groupTheme, button: theme } = mergeDeep(useTheme().theme, customTheme); + const { buttonGroup: groupTheme, button: buttonTheme } = useTheme().theme; + const theme = mergeDeep(buttonTheme, customTheme); const isLink = typeof href !== 'undefined'; const Component = isLink ? 'a' : 'button';