Skip to content

Commit

Permalink
rotate icon when open
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 28, 2020
1 parent cd8a28e commit 96812f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/src/modules/components/AppDrawerNavItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ const useStyles = makeStyles((theme) => ({
marginLeft: -6,
color: theme.palette.text.secondary,
},
'& svg$open': {
transform: 'rotate(90deg)',
},
'&:hover svg': {
color: theme.palette.text.primary,
},
},
open: {},
link: {
...theme.typography.body2,
borderRadius: theme.shape.borderRadius,
Expand Down Expand Up @@ -118,7 +122,7 @@ export default function AppDrawerNavItem(props) {
onClick={handleClick}
style={style}
>
<ArrowRight />
<ArrowRight className={open ? classes.open : ''} />
{title}
</button>
<Collapse in={open} timeout="auto" unmountOnExit>
Expand Down

0 comments on commit 96812f8

Please sign in to comment.