2023-11-03 12:56:03 +01:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
export default function ThemeSwitcher(){
|
|
|
|
const [theme, setTheme] = React.useState("dark");
|
|
|
|
|
|
|
|
React.useEffect(() => {document.body.setAttribute("data-theme", theme)});
|
|
|
|
|
|
|
|
return(
|
2023-11-04 19:16:56 +01:00
|
|
|
<ul className="p-2 right-0 text-base-content z-10">
|
2023-11-03 12:56:03 +01:00
|
|
|
<li><a onClick={() => setTheme("light")}>Light</a></li>
|
|
|
|
<li><a onClick={() => setTheme("dark")}>Dark</a></li>
|
|
|
|
<li><a onClick={() => setTheme("synthwave")}>Synthwave</a></li>
|
|
|
|
<li><a onClick={() => setTheme("cyberpunk")}>Cyberpunk</a></li>
|
|
|
|
<li><a onClick={() => setTheme("valentine")}>Valentine</a></li>
|
2023-11-04 19:31:43 +01:00
|
|
|
<li><a onClick={() => setTheme("pastel")}>Pastel</a></li>
|
|
|
|
<li><a onClick={() => setTheme("aqua")}>Aqua</a></li>
|
2023-11-16 02:46:22 +01:00
|
|
|
<li><a onClick={() => setTheme("coffee")}>Coffee</a></li>
|
|
|
|
<li><a onClick={() => setTheme("dim")}>Dim</a></li>
|
2023-11-03 12:56:03 +01:00
|
|
|
</ul>
|
|
|
|
);
|
|
|
|
}
|