Skip to content

Commit 12007b9

Browse files
authored
Fix docs color mode switch callback (#1022)
1 parent 0602521 commit 12007b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/content/docs/themes.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ Here's a callback to change the theme:
8383
clientside_callback(
8484
" " "
8585
(switchOn) => {
86-
switchOn
87-
? document.documentElement.setAttribute('data-bs-theme', 'light')
88-
: document.documentElement.setAttribute('data-bs-theme', 'dark')
86+
document.documentElement.setAttribute("data-bs-theme", switchOn ? "light" : "dark");
8987
return window.dash_clientside.no_update
9088
}
9189
" " ",

0 commit comments

Comments
 (0)