Add codegen to AndroidDrawer

Summary:
Using Ricky's last changes I managed to subscribe for both new and old event name.

Fixed event to proper one for codegen in native code.

Reviewed By: TheSavior

Differential Revision: D16065660

fbshipit-source-id: b5d3762d673a34bbdf5a8e60ff4d51617c8adb81
This commit is contained in:
Michał Osadnik
2019-07-03 02:29:47 -07:00
committed by Facebook Github Bot
parent aa860fb5df
commit b7782fb57c
5 changed files with 33 additions and 46 deletions
@@ -22,7 +22,7 @@ const nullthrows = require('nullthrows');
const DrawerConsts = UIManager.getViewManagerConfig('AndroidDrawerLayout')
.Constants;
const dismissKeyboard = require('../../Utilities/dismissKeyboard');
const AndroidDrawerLayoutNativeComponent = require('./AndroidDrawerLayoutNativeComponent');
import AndroidDrawerLayoutNativeComponent from './AndroidDrawerLayoutNativeComponent';
const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];
@@ -176,7 +176,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
state = {statusBarBackgroundColor: null};
render() {
const {onDrawerStateChanged, ...props} = this.props;
const {onDrawerStateChanged, renderNavigationView, ...props} = this.props;
const drawStatusBar =
Platform.Version >= 21 && this.props.statusBarBackgroundColor;
const drawerViewWrapper = (
@@ -189,7 +189,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
},
]}
collapsable={false}>
{this.props.renderNavigationView()}
{renderNavigationView()}
{drawStatusBar && <View style={styles.drawerStatusBar} />}
</View>
);