Skip to content

Commit

Permalink
[docs][material-ui][Menu] Replace PaperProps with slotProps.paper
Browse files Browse the repository at this point in the history
… in demos (#43354)
  • Loading branch information
sai6855 committed Aug 21, 2024
1 parent b66a718 commit c6cdde8
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 54 deletions.
48 changes: 25 additions & 23 deletions docs/data/material/components/menus/AccountMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,31 @@ export default function AccountMenu() {
open={open}
onClose={handleClose}
onClick={handleClose}
PaperProps={{
elevation: 0,
sx: {
overflow: 'visible',
filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
mt: 1.5,
'& .MuiAvatar-root': {
width: 32,
height: 32,
ml: -0.5,
mr: 1,
},
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
top: 0,
right: 14,
width: 10,
height: 10,
bgcolor: 'background.paper',
transform: 'translateY(-50%) rotate(45deg)',
zIndex: 0,
slotProps={{
paper: {
elevation: 0,
sx: {
overflow: 'visible',
filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
mt: 1.5,
'& .MuiAvatar-root': {
width: 32,
height: 32,
ml: -0.5,
mr: 1,
},
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
top: 0,
right: 14,
width: 10,
height: 10,
bgcolor: 'background.paper',
transform: 'translateY(-50%) rotate(45deg)',
zIndex: 0,
},
},
},
}}
Expand Down
48 changes: 25 additions & 23 deletions docs/data/material/components/menus/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,31 @@ export default function AccountMenu() {
open={open}
onClose={handleClose}
onClick={handleClose}
PaperProps={{
elevation: 0,
sx: {
overflow: 'visible',
filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
mt: 1.5,
'& .MuiAvatar-root': {
width: 32,
height: 32,
ml: -0.5,
mr: 1,
},
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
top: 0,
right: 14,
width: 10,
height: 10,
bgcolor: 'background.paper',
transform: 'translateY(-50%) rotate(45deg)',
zIndex: 0,
slotProps={{
paper: {
elevation: 0,
sx: {
overflow: 'visible',
filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
mt: 1.5,
'& .MuiAvatar-root': {
width: 32,
height: 32,
ml: -0.5,
mr: 1,
},
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
top: 0,
right: 14,
width: 10,
height: 10,
bgcolor: 'background.paper',
transform: 'translateY(-50%) rotate(45deg)',
zIndex: 0,
},
},
},
}}
Expand Down
10 changes: 6 additions & 4 deletions docs/data/material/components/menus/LongMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export default function LongMenu() {
anchorEl={anchorEl}
open={open}
onClose={handleClose}
PaperProps={{
style: {
maxHeight: ITEM_HEIGHT * 4.5,
width: '20ch',
slotProps={{
paper: {
style: {
maxHeight: ITEM_HEIGHT * 4.5,
width: '20ch',
},
},
}}
>
Expand Down
10 changes: 6 additions & 4 deletions docs/data/material/components/menus/LongMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export default function LongMenu() {
anchorEl={anchorEl}
open={open}
onClose={handleClose}
PaperProps={{
style: {
maxHeight: ITEM_HEIGHT * 4.5,
width: '20ch',
slotProps={{
paper: {
style: {
maxHeight: ITEM_HEIGHT * 4.5,
width: '20ch',
},
},
}}
>
Expand Down

0 comments on commit c6cdde8

Please sign in to comment.