Skip to content

Commit

Permalink
fix: add the dark mode class to html tag
Browse files Browse the repository at this point in the history
  • Loading branch information
aramalipoor committed Nov 7, 2022
1 parent 8df8c56 commit 82b35ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/common/utils/dark-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const setDarkMode = (
}

if (isDarkMode()) {
document?.body?.classList?.add('dark');
document?.documentElement?.classList?.add('dark');
} else {
document?.body?.classList?.remove('dark');
document?.documentElement?.classList?.remove('dark');
}
};

0 comments on commit 82b35ae

Please sign in to comment.