1. styles in JS
2. admin container for dashboard, products, ....
adminStyle.js:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
drawerWidth, | |
transition, | |
container | |
} from "assets/jss/material-dashboard-react.js"; | |
const appStyle = theme => ({ | |
wrapper: { | |
position: "relative", | |
top: "0", | |
height: "100vh" | |
}, | |
mainPanel: { | |
[theme.breakpoints.up("md")]: { | |
width: `calc(100% - ${drawerWidth}px)` | |
}, | |
overflow: "auto", | |
position: "relative", | |
float: "right", | |
...transition, | |
maxHeight: "100%", | |
width: "100%", | |
overflowScrolling: "touch" | |
}, | |
content: { | |
marginTop: "70px", | |
padding: "30px 15px", | |
minHeight: "calc(100vh - 123px)" | |
}, | |
container, | |
map: { | |
marginTop: "70px" | |
} | |
}); | |
export default appStyle; |
Admin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styles from 'assets/jss/material-dashboard-react/layouts/adminStyle.js' | |
const useStyles = makeStyles(styles) | |
export default function Admin ({ ...rest }) { | |
// styles | |
const classes = useStyles() | |
... | |
return ( | |
<div className={classes.wrapper}> | |
... | |
</div> | |
) | |
} |
Comments
Post a Comment