Based on the information provided in the sandbox, the styles are linked to CustomMenuItem
, which represents the list items. To directly target the list and eliminate the padding, it is suggested to apply styling to the Menu
itself using the sx
prop (or alternatively create a custom component with styled
):
Check out the modified version here: codesandbox
<Menu
{...bindMenu(popupState)}
sx={{
"& .MuiList-root": {
py: "0px",
},
}}
>
<CustomMenuItem
onClick={() => {
console.log("hello");
popupState.close();
}}
>
label
</CustomMenuItem>
</Menu>