Skip to content

Commit

Permalink
Merge pull request #29 from Th1nhNg0/master
Browse files Browse the repository at this point in the history
fix menu responsive
  • Loading branch information
sivaavkd authored Oct 21, 2021
2 parents 6a22594 + d3edd5f commit 83be8b2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/TreeMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ const useStyles = makeStyles(
[theme.breakpoints.up('md')]: {
marginTop: '1.5em',
},
transition: theme.transitions.create("width", {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
},
open: {
width: 200,
},
closed: {
width: 55,
},
}),
{ name: 'RaTreeMenu' }
Expand Down Expand Up @@ -120,7 +130,7 @@ const Menu = (props) => {
else if (resource.name) {
resourcename = translate(`resources.${resource.name}.name`);
if (resourcename.startsWith('resources.'))
resourcename = geResourceName(resource.name);
resourcename = geResourceName(resource.name);
}
return resourcename;
}
Expand Down Expand Up @@ -213,7 +223,10 @@ const Menu = (props) => {
return (
<div>
<div
className={classnames(classes.main, className)}
className={classnames(classes.main, className, {
[classes.open]: open,
[classes.closed]: !open,
})}
{...rest}
>
{hasDashboard && (
Expand Down

0 comments on commit 83be8b2

Please sign in to comment.