diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index deebd5102e05a3..9c7b9154bbc38d 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -56,7 +56,7 @@ type Props = $ReadOnly<{| * ); * ``` */ - drawerBackgroundColor: ColorValue, + drawerBackgroundColor?: ?ColorValue, /** * Specifies the side of the screen from which the drawer will slide in. @@ -161,11 +161,6 @@ class DrawerLayoutAndroid extends React.Component { return {Left: 'left', Right: 'right'}; } - static defaultProps: {| - drawerBackgroundColor: 'white', - |} = { - drawerBackgroundColor: 'white', - }; _nativeRef = React.createRef< React.ElementRef, @@ -175,6 +170,7 @@ class DrawerLayoutAndroid extends React.Component { render(): React.Node { const { + drawerBackgroundColor = 'white', onDrawerStateChanged, renderNavigationView, onDrawerOpen, @@ -189,7 +185,7 @@ class DrawerLayoutAndroid extends React.Component { styles.drawerSubview, { width: this.props.drawerWidth, - backgroundColor: this.props.drawerBackgroundColor, + backgroundColor: drawerBackgroundColor, }, ]} collapsable={false}> @@ -220,6 +216,7 @@ class DrawerLayoutAndroid extends React.Component { should render as expected: should deep render w exports[` should render as expected: should shallow render as when mocked 1`] = ` should render as expected: should shallow rende exports[` should render as expected: should shallow render as when not mocked 1`] = `