From 44c4e966d4223be94da6d807273e0223efb6b276 Mon Sep 17 00:00:00 2001 From: nehvaleem Date: Wed, 28 Dec 2016 22:16:56 +0100 Subject: [PATCH] added renderFooter in DrawerNavigation --- src/drawer/ExNavigationDrawer.js | 5 +++++ src/drawer/ExNavigationDrawerLayout.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/drawer/ExNavigationDrawer.js b/src/drawer/ExNavigationDrawer.js index ad77eca..da008cb 100644 --- a/src/drawer/ExNavigationDrawer.js +++ b/src/drawer/ExNavigationDrawer.js @@ -62,6 +62,7 @@ type Props = { navigatorUID: string, initialItem: string, renderHeader: () => React.Element, + renderFooter: () => React.Element, renderNavigationView: () => React.Element, drawerBackgroundColor: string, drawerWidth: 300, @@ -97,6 +98,9 @@ class ExNavigationDrawer extends PureComponent { renderHeader() { return null; }, + renderFooter() { + return null; + }, }; static contextTypes = { @@ -141,6 +145,7 @@ class ExNavigationDrawer extends PureComponent { const drawerLayoutProps = { children: this.renderContent(), renderHeader: this.props.renderHeader, + renderFooter: this.props.renderFooter, selectedItem: navigationState.routes[navigationState.index].key, items: this.state.drawerItems, drawerBackgroundColor: this.props.drawerBackgroundColor, diff --git a/src/drawer/ExNavigationDrawerLayout.js b/src/drawer/ExNavigationDrawerLayout.js index 51c1d4a..4b941c9 100644 --- a/src/drawer/ExNavigationDrawerLayout.js +++ b/src/drawer/ExNavigationDrawerLayout.js @@ -16,6 +16,7 @@ import TouchableNativeFeedbackSafe from '@exponent/react-native-touchable-native type Props = { renderHeader: () => React.Element, + renderFooter: () => React.Element, width: number, children: React.Element, drawerBackgroundColor: string, @@ -68,6 +69,10 @@ export default class ExNavigationDrawerLayout extends React.Component { {this._renderDrawerItems()} + + + {this.props.renderFooter()} + ); }