Skip to content

Commit

Permalink
[joy-ui][docs] Fix Color mode button on Theme builder (mui#44864)
Browse files Browse the repository at this point in the history
  • Loading branch information
komkanit authored Dec 27, 2024
1 parent b455d50 commit ed4823e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/src/modules/components/JoyThemeBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,11 @@ export default function JoyThemeBuilder() {
<ToggleButtonGroup
size="sm"
value={colorMode}
onChange={(event, newValue) => setColorMode(newValue as 'light' | 'dark')}
onChange={(event, newValue) => {
if (newValue) {
setColorMode(newValue as 'light' | 'dark');
}
}}
>
<Button value="light">
<LightMode />
Expand Down

0 comments on commit ed4823e

Please sign in to comment.