diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index 85a5ebb633c879..687c270be25f82 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -82,6 +82,18 @@ var DrawerLayoutAndroid = React.createClass({ 'none', // default 'on-drag', ]), + /** + * Specifies the background color of the drawer. The default value is white. + * If you want to set the opacity of the drawer, use rgba. Example: + * + * ``` + * return ( + * + * + * ); + * ``` + */ + drawerBackgroundColor: ColorPropType, /** * Specifies the side of the screen from which the drawer will slide in. */ @@ -141,6 +153,12 @@ var DrawerLayoutAndroid = React.createClass({ mixins: [NativeMethodsMixin], + getDefaultProps: function(): Object { + return { + drawerBackgroundColor: 'white', + }; + }, + getInitialState: function() { return {statusBarBackgroundColor: undefined}; }, @@ -160,7 +178,12 @@ var DrawerLayoutAndroid = React.createClass({ render: function() { var drawStatusBar = Platform.Version >= 21 && this.props.statusBarBackgroundColor; var drawerViewWrapper = - + {this.props.renderNavigationView()} {drawStatusBar && } ; @@ -283,7 +306,6 @@ var styles = StyleSheet.create({ position: 'absolute', top: 0, bottom: 0, - backgroundColor: 'white', }, statusBar: { height: StatusBar.currentHeight,