mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
themes and dimensions
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { MdOutlineDarkMode, MdLightbulbOutline } from "react-icons/md";
|
||||
import useDarkMode from "@/hooks/useDarkMode";
|
||||
|
||||
// TODO write tests for light/mode
|
||||
// TODO new SVG for light/dark theme
|
||||
// TODO fix TS error on setTheme
|
||||
const ThemeSwitcher = () => {
|
||||
const [colorTheme, setTheme] = useDarkMode();
|
||||
|
||||
return (
|
||||
<>
|
||||
{colorTheme === "light" ? (
|
||||
<MdOutlineDarkMode onClick={() => setTheme("light")} />
|
||||
) : (
|
||||
<MdLightbulbOutline onClick={() => setTheme("dark")} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ThemeSwitcher;
|
||||
Reference in New Issue
Block a user