From bab48fea6f703885c9d8f3ee5a6ae4e8ac3f3f15 Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Wed, 7 Dec 2022 10:41:24 -0500 Subject: [PATCH] Revert "fix(Toggle): fix issue with side label when hideLabel is true (#12094)" This reverts commit 89f51a3cc61e625ce9a4e97011c9ac74b581557a. --- packages/react/src/components/Toggle/Toggle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/Toggle/Toggle.js b/packages/react/src/components/Toggle/Toggle.js index f34cdbe8c052..b66c3bbaa12e 100644 --- a/packages/react/src/components/Toggle/Toggle.js +++ b/packages/react/src/components/Toggle/Toggle.js @@ -44,7 +44,7 @@ export function Toggle({ } const isSm = size === 'sm'; - const sideLabel = checked ? labelB : labelA; + const sideLabel = hideLabel ? labelText : checked ? labelB : labelA; const wrapperClasses = classNames( `${prefix}--toggle`,