Skip to content

Commit 291c8cd

Browse files
committed
fix(MenuItem): Remove maxWidth and add it on Menu instead
1 parent 8666450 commit 291c8cd

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

react/Menu/Readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ const hideMenu = () => setState({ showMenu: false })
7676
</ListItemIcon>
7777
<ListItemText primary="Attachment" />
7878
</MenuItem>
79+
<MenuItem onClick={hideMenu}>
80+
<ListItemIcon>
81+
<Icon icon={PeopleIcon} />
82+
</ListItemIcon>
83+
<ListItemText
84+
primary="Item with a very long title to show how it should be displayed"
85+
primaryTypographyProps={{ ellipsis: false }}
86+
/>
87+
</MenuItem>
7988
<MenuItem onClick={hideMenu}>
8089
<ListItemText primary="Item without icon" />
8190
</MenuItem>

react/MuiCozyTheme/overrides/makeLightNormalOverrides.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,13 @@ export const makeLightNormalOverrides = theme => ({
365365
right: 0
366366
}
367367
},
368+
MuiMenu: {
369+
paper: {
370+
maxWidth: 320
371+
}
372+
},
368373
MuiMenuItem: {
369374
root: {
370-
maxWidth: 320,
371375
whiteSpace: 'normal',
372376
overflow: 'auto',
373377
paddingTop: 4,

0 commit comments

Comments
 (0)