title: How to change background color of drawer component materialui in react?
body: <p>I wanted to change the background color of the drawer component in react but I always am only able to change the entire background behind the drawer the field with the items or nothing but not the entire white area. Here is my code:</p>
  <pre><code>const useStyles = makeStyles({
      MuiDrawer: {
        backgroundColor: &quot;#5d001e&quot;,
      },
      list: {
        width: 250,
      },
      linkText: {
        textDecoration: `none`,
        textTransform: `uppercase`,
        color: `black`,
      },
    })
  
  
  return (
          &lt;&gt;
          &lt;React.Fragment&gt;
          &lt;TheIconButton
            edge=&quot;start&quot;
            aria-label=&quot;menu&quot;
            onClick={toggleDrawer(&quot;right&quot;, true)}&gt;
            &lt;Menu /&gt;
          &lt;/TheIconButton&gt;
          &lt;Drawer anchor=&quot;right&quot; open={state.right} onOpen={toggleDrawer(&quot;right&quot;, true)} onClose={toggleDrawer(&quot;right&quot;, false)} className={classes.MuiDrawer}&gt;
          {sideDrawerList(&quot;right&quot;)}
          &lt;/Drawer&gt;
        &lt;/React.Fragment&gt;
          &lt;/&gt;
      )
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ZbzlC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZbzlC.png" alt="enter image description here" /></a></p>
  <p>Any ideas on how to target it ? I also tried forcing it with a class in a css file but it did not work....</p>