我创建了一个标题菜单。它在 Material-UI V4 中仍然有效。但我最近更新到了 Material-UI V5。但我有这样的错误: TypeError: Cannot readproperties of undefined (reading 'down')
import makeStyles from "@mui/styles/makeStyles";
import { Theme } from "@mui/system";
// NOTE: Styling header bar components
const useStyles = makeStyles((theme: Theme) => ({
title: {
flexGrow: 1,
},
linkStyle: {
textDecoration: "none",
color: "white",
marginLeft: 5,
},
desktopMenuStyle: {
display: "display",
[theme.breakpoints.down("mobile")]: {
display: "none",
},
},
mobileMenuStyle: {
display: "none",
"& .MuiList-root": {
marginTop: 40,
},
[theme.breakpoints.down("laptop")]: {
display: "block",
},
},
}));
Run Code Online (Sandbox Code Playgroud)