This commit is contained in:
Mckay Wrigley
2023-03-15 04:24:09 -06:00
parent a6503fb498
commit ce331a1bbd
13 changed files with 212 additions and 84 deletions
+20
View File
@@ -0,0 +1,20 @@
import { IconMoon, IconSun } from "@tabler/icons-react";
import { FC } from "react";
import { SidebarButton } from "./SidebarButton";
interface Props {
lightMode: "light" | "dark";
onToggleLightMode: (mode: "light" | "dark") => void;
}
export const SidebarSettings: FC<Props> = ({ lightMode, onToggleLightMode }) => {
return (
<div className="flex flex-col items-center border-t border-neutral-500 py-4">
<SidebarButton
text={lightMode === "light" ? "Dark mode" : "Light mode"}
icon={lightMode === "light" ? <IconMoon /> : <IconSun />}
onClick={() => onToggleLightMode(lightMode === "light" ? "dark" : "light")}
/>
</div>
);
};