Currently, I am utilizing the Menu component from material-ui
and facing an issue while trying to modify the background color. The problem arises when I attempt to apply a color to the Menu, as it ends up altering the entire page's background once the menu popper appears. Moreover, assigning a color to individual Menu Items results in some unwanted grey shades at the top and bottom due to all these items being contained within a div.
Issue Demo: https://codesandbox.io/s/material-ui-dropdown-background-color-g88e1
What is the correct approach for changing the Menu's background color?
My initial attempt involved using createMuiTheme
to make this modification, but unfortunately, it altered the color of all Menu components throughout my application. Instead, I am seeking a solution that allows me to apply this style solely to one of the Menu Items. Therefore, I am exploring ways to achieve this using makeStyle
.