From 0e42c3a2e5038658acf54c8eef51d0640aebb266 Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Thu, 8 Dec 2022 12:55:24 -0500 Subject: [PATCH] Revert "fix(Toggle): fix issue with side label when hideLabel is true (#12094)" (#12810) This reverts commit 89f51a3cc61e625ce9a4e97011c9ac74b581557a. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- 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`,