mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
improved static styles and x-browser scrollbars
This commit is contained in:
parent
2271cc0044
commit
f52c6f3b41
5 changed files with 61 additions and 27 deletions
|
@ -20,7 +20,7 @@ export function ColorProvider({ initialTheme, children }) {
|
|||
const [color, setColor] = useState(getInitialColor);
|
||||
|
||||
const rawSetColor = (rawColor) => {
|
||||
const root = window.document.documentElement;
|
||||
const root = window.document.getElementById("page_wrapper");
|
||||
|
||||
root.classList.remove(`theme-${lastColor}`);
|
||||
root.classList.add(`theme-${rawColor}`);
|
||||
|
|
|
@ -22,7 +22,7 @@ export function ThemeProvider({ initialTheme, children }) {
|
|||
const [theme, setTheme] = useState(getInitialTheme);
|
||||
|
||||
const rawSetTheme = (rawTheme) => {
|
||||
const root = window.document.documentElement;
|
||||
const root = window.document.getElementById("page_wrapper");
|
||||
const isDark = rawTheme === "dark";
|
||||
|
||||
root.classList.remove(isDark ? "light" : "dark");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue