Basic Color switch - WIP

This commit is contained in:
Lucian Petri
2022-12-29 18:43:55 +02:00
parent 721012ab27
commit ded14c737f
2 changed files with 17 additions and 3 deletions
@@ -0,0 +1,11 @@
import { Button, useColorMode } from "@chakra-ui/react";
import React from "react";
type Props = {};
const ColorModeSwitch = (props: Props) => {
const { colorMode, toggleColorMode } = useColorMode();
return <Button onClick={toggleColorMode}>Toggle {colorMode === "light" ? "Dark" : "Light"}</Button>;
};
export default ColorModeSwitch;