Skip to content

Commit

Permalink
fix(themer): Set dark mode correctly for preview (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Mar 25, 2024
1 parent 3321ff1 commit 32abf6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inst/themer/themer.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@
});

$(document).on("change", "#bsthemer-dark-mode", function(ev) {
document.body.dataset.bsTheme = ev.target.checked ? "dark" : "light";
const colorMode = ev.target.checked ? "dark" : "light";
document.documentElement.dataset.bsTheme = colorMode;
$(window).resize();
});

Expand Down

0 comments on commit 32abf6d

Please sign in to comment.