From ed4823ee718d0f97d7ac3eae90d3b64f7e16b349 Mon Sep 17 00:00:00 2001 From: komkanit Date: Fri, 27 Dec 2024 18:24:24 +0700 Subject: [PATCH] [joy-ui][docs] Fix Color mode button on Theme builder (#44864) --- docs/src/modules/components/JoyThemeBuilder.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/modules/components/JoyThemeBuilder.tsx b/docs/src/modules/components/JoyThemeBuilder.tsx index a4fc588f4cc30e..c1ab6e0261562a 100644 --- a/docs/src/modules/components/JoyThemeBuilder.tsx +++ b/docs/src/modules/components/JoyThemeBuilder.tsx @@ -1494,7 +1494,11 @@ export default function JoyThemeBuilder() { setColorMode(newValue as 'light' | 'dark')} + onChange={(event, newValue) => { + if (newValue) { + setColorMode(newValue as 'light' | 'dark'); + } + }} >