Skip to content

Commit

Permalink
chore: update querySelector element
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Sep 24, 2024
1 parent a651a60 commit 4dacdc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/helpers/theme.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const calculateShades = (hexValue: string): TShades => {

export const applyTheme = (palette: string, isDarkPalette: boolean) => {
if (!palette) return;
const themeElement = window.document?.querySelector<HTMLElement>("[data-theme]");
const themeElement = document?.querySelector("html");
// palette: [bg, text, primary, sidebarBg, sidebarText]
const values: string[] = palette.split(",");
values.push(isDarkPalette ? "dark" : "light");
Expand Down

0 comments on commit 4dacdc4

Please sign in to comment.