mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-13 11:50:37 +08:00
Basic Color switch - WIP
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user