title: Change background color of top bar when navigation drawer is opened
body: <p>I am developing a react-native project. My screens are in white color, but navigation drawer from left in dark grey color, I would like to have the top bar part of the screen also show dark grey when the drawer is opened but still show white when drawer is closed, how to achieve that?</p>
  <p>I am using <code>&quot;@react-navigation/drawer&quot;: &quot;^5.8.6&quot;</code> for my drawer:</p>
  <pre><code>&lt;Drawer.Navigator
      initialRouteName={InitialScreen}
      drawerContent={props =&gt; &lt;MyDrawer {...props} /&gt;}
      screenOptions={{
          headerShown: true,
      }}&gt;
      &lt;Drawer.Screen name=&quot;main&quot; component={MainScreen} /&gt;
  &lt;/Drawer.Navigator&gt;
  </code></pre>
  <p>As you can see I am using my custom layout for the drawer content <code>&lt;MyDrawer /&gt;</code>, there, I set background to dark grey.</p>
  <p>The following screenshot shows how it looks like at the moment when drawer is opened.
  <a href="https://i.stack.imgur.com/l523t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l523t.png" alt="enter image description here" /></a></p>