From 65fc9c37dad19e25171b87271974efd81f45969f Mon Sep 17 00:00:00 2001 From: lissavxo Date: Thu, 12 Dec 2024 17:29:34 -0300 Subject: [PATCH 1/2] fix: text empty nbsp --- react/lib/components/Button/Button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react/lib/components/Button/Button.tsx b/react/lib/components/Button/Button.tsx index 52a85d5b..07501084 100644 --- a/react/lib/components/Button/Button.tsx +++ b/react/lib/components/Button/Button.tsx @@ -129,7 +129,8 @@ export const Button = (props: ButtonProps): React.ReactElement => { onMouseLeave={handleMouseLeave} ref={buttonRef} > - {transitioning !== hovering ? hoverText : text} + + {transitioning !== hovering ? hoverText : (text ? text :
 
)}
); From 6067bc8aa160749ec9a933c0e4888ea5d5643f4f Mon Sep 17 00:00:00 2001 From: lissavxo Date: Thu, 19 Dec 2024 16:07:40 -0300 Subject: [PATCH 2/2] fix: trim text --- react/lib/components/Button/Button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/lib/components/Button/Button.tsx b/react/lib/components/Button/Button.tsx index 07501084..0ecce2fc 100644 --- a/react/lib/components/Button/Button.tsx +++ b/react/lib/components/Button/Button.tsx @@ -129,8 +129,8 @@ export const Button = (props: ButtonProps): React.ReactElement => { onMouseLeave={handleMouseLeave} ref={buttonRef} > - - {transitioning !== hovering ? hoverText : (text ? text :
 
)}
+ {transitioning !== hovering ? hoverText : (text && text.trim() !== "" ? text :
 
)} +
);