2021-12-09 18:28:57 +03:00
|
|
|
import { Box } from "@mui/system";
|
|
|
|
import { useRecoilState } from "recoil";
|
|
|
|
import { atomPaletteMode } from "../states/setting";
|
|
|
|
import PaletteSwitch from "../components/palette-switch";
|
|
|
|
|
2021-12-08 18:36:34 +03:00
|
|
|
const SettingPage = () => {
|
2021-12-09 18:28:57 +03:00
|
|
|
const [mode, setMode] = useRecoilState(atomPaletteMode);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Box>
|
|
|
|
<h1>Setting</h1>
|
|
|
|
|
|
|
|
<Box>
|
|
|
|
<PaletteSwitch
|
|
|
|
checked={mode !== "light"}
|
|
|
|
onChange={(_e, c) => setMode(c ? "dark" : "light")}
|
|
|
|
inputProps={{ "aria-label": "controlled" }}
|
|
|
|
/>
|
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
);
|
2021-12-08 18:36:34 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingPage;
|