/* eslint-disable @typescript-eslint/no-unused-vars */ // TODO: remove above! /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import React, { useContext, useState } from 'react'; import { makeStyles } from '@material-ui/core/styles'; import MoreIcon from '@material-ui/icons/MoreVert'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import IconButton from '@material-ui/core/IconButton'; import MenuIcon from '@material-ui/icons/Menu'; import MenuItem from '@material-ui/core/MenuItem'; import Menu from '@material-ui/core/Menu'; import TemporaryDrawer from './TemporaryDrawer'; import NavBarTitle from '../context/NavbarTitle'; import DarkTheme from '../context/DarkTheme'; const useStyles = makeStyles((theme) => ({ root: { flexGrow: 1, }, menuButton: { marginRight: theme.spacing(2), }, title: { flexGrow: 1, }, })); // const theme = createMuiTheme({ // overrides: { // MuiAppBar: { // colorPrimary: { backgroundColor: '#FFC0CB' }, // }, // }, // palette: { type: 'dark' }, // }); export default function NavBar() { const classes = useStyles(); const [drawerOpen, setDrawerOpen] = useState(false); const [anchorEl, setAnchorEl] = React.useState(null); const { title } = useContext(NavBarTitle); const open = Boolean(anchorEl); const { darkTheme } = useContext(DarkTheme); const handleMenu = (event: React.MouseEvent) => { setAnchorEl(event.currentTarget); }; const handleClose = () => { setAnchorEl(null); }; return (
setDrawerOpen(true)} > {title} {/* */} {/* { setDarkTheme(true); handleClose(); }} > Dark Theme { setDarkTheme(false); handleClose(); }} > Light Theme */}
); }