mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
Move GridMenu to ui/
This commit is contained in:
1 parent
34bfab2448
commit
0bbd463c01
2 files changed
+10
-10
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import React from "react";
|
||||
import { AppIcon } from "./AppIcon";
|
||||
import { Grid, makeStyles } from "@material-ui/core";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
marginTop: theme.spacing(3)
|
||||
},
|
||||
item: {
|
||||
marginTop: theme.spacing(3),
|
||||
width: '20%'
|
||||
}
|
||||
}));
|
||||
|
||||
export const GridMenu = ({ items, Component = AppIcon }) => {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Grid container justify="center">
|
||||
<Grid container item>
|
||||
{items &&
|
||||
items.length &&
|
||||
items.map((item) => (
|
||||
<Grid
|
||||
item
|
||||
className={classes.item}
|
||||
key={item.name}
|
||||
tabindex="-1"
|
||||
component={Link}
|
||||
to={item.path}
|
||||
>
|
||||
<Component {...item} />
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user