From 94370d1564caad0f1b2dcdbe3936cd951cabdbda Mon Sep 17 00:00:00 2001 From: navedqb <109583873+navedqb@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:32:58 +0530 Subject: [PATCH] correct empty label rendering in togglebutton --- components/lib/togglebutton/ToggleButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/togglebutton/ToggleButton.js b/components/lib/togglebutton/ToggleButton.js index 08cdc487ca..0f9e92b891 100644 --- a/components/lib/togglebutton/ToggleButton.js +++ b/components/lib/togglebutton/ToggleButton.js @@ -21,7 +21,7 @@ export const ToggleButton = React.memo( const hasLabel = props.onLabel && props.onLabel.length > 0 && props.offLabel && props.offLabel.length > 0; const hasIcon = props.onIcon && props.offIcon; - const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : ' '; + const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : '\u00A0'; const icon = props.checked ? props.onIcon : props.offIcon; const toggle = (e) => {