From 4f23182a05a103df483c9b2aeb8fbaeea88b9c1a Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Wed, 29 Mar 2023 07:47:26 -0500 Subject: [PATCH] fix(react-button): suppressDefaultClass warning Warrning occurs when the property was being set on a HTML button The conditional fixes that by checking if it's a Link component fix: DSS-374 --- packages/sage-react/lib/Button/Button.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sage-react/lib/Button/Button.jsx b/packages/sage-react/lib/Button/Button.jsx index 4ba663b1ec..7bffa4922b 100644 --- a/packages/sage-react/lib/Button/Button.jsx +++ b/packages/sage-react/lib/Button/Button.jsx @@ -77,7 +77,7 @@ export const Button = React.forwardRef(({ aria-disabled={isLink && disabled} disabled={!isLink && disabled} tag={isLink ? linkTag : null} - suppressDefaultClass={isLink} + {...(isLink ? { suppressDefaultClass: isLink } : {})} onClick={onClick} {...rest} >