Biome upgrades, theme upgrades, lots of daisy changes

This commit is contained in:
2025-07-05 12:29:48 +01:00
parent 95f317fd75
commit 89875a9341
29 changed files with 746 additions and 584 deletions

View File

@@ -5,22 +5,24 @@ import type React from "react";
export default function ThemeSwitcher(): React.JSX.Element {
const toggleTheme = (): void => {
const currentTheme = document.documentElement.getAttribute('data-theme');
if (currentTheme === 'light') {
localStorage.theme = 'dark';
document.documentElement.setAttribute('data-theme', 'dark');
} else {
localStorage.theme = 'light';
document.documentElement.setAttribute('data-theme', 'light');
}
const currentTheme = document.documentElement.getAttribute("data-theme");
if (currentTheme === "dracula-pastel") {
localStorage.theme = "dracula-soft";
document.documentElement.setAttribute("data-theme", "dracula-soft");
} else {
localStorage.theme = "dracula-pastel";
document.documentElement.setAttribute("data-theme", "dracula-pastel");
}
};
return (
<>
<button type="button" className="m-1 h-8 w-8 rounded-full" onClick={toggleTheme}>
<MoonIcon className="block dark:hidden" />
<SunIcon className="hidden dark:block" />
</button>
</>
<button
type="button"
className="btn w-9 h-9 btn-circle border-2 hover:bg-primary/25 border-primary/75 p-1 transition-colors duration-100"
onClick={toggleTheme}
>
<MoonIcon className="block dark:hidden" />
<SunIcon className="hidden dark:block" />
</button>
);
}