From a8987e24df21a51901316651c2dd88ef308fda6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=A4gy?= Date: Tue, 21 Nov 2023 16:08:21 +0100 Subject: [PATCH] Simplify code example in ToggleControl component readme --- packages/components/src/toggle-control/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/toggle-control/README.md b/packages/components/src/toggle-control/README.md index 5e2732fb07416..3a77ef6942d2e 100644 --- a/packages/components/src/toggle-control/README.md +++ b/packages/components/src/toggle-control/README.md @@ -22,8 +22,8 @@ const MyToggleControl = () => { : 'No fixed background.' } checked={ hasFixedBackground } - onChange={ () => { - setHasFixedBackground( ( state ) => ! state ); + onChange={ (newValue) => { + setHasFixedBackground( newValue ); } } /> );