mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +00:00
added property inside drawerConfig to backgroundColor (drawerBackgroundColor) (#2698)
This commit is contained in:
parent
e4a7b7e073
commit
df788fd9ac
@ -32,6 +32,7 @@ const DefaultDrawerConfig = {
|
||||
Dimensions.get('window').width - (Platform.OS === 'android' ? 56 : 64),
|
||||
contentComponent: DrawerItems,
|
||||
drawerPosition: 'left',
|
||||
drawerBackgroundColor: 'white',
|
||||
useNativeAnimations: true,
|
||||
};
|
||||
|
||||
@ -48,6 +49,7 @@ const DrawerNavigator = (
|
||||
contentOptions,
|
||||
drawerPosition,
|
||||
useNativeAnimations,
|
||||
drawerBackgroundColor,
|
||||
...tabsConfig
|
||||
} = mergedConfig;
|
||||
|
||||
@ -83,6 +85,7 @@ const DrawerNavigator = (
|
||||
)((props: *) => (
|
||||
<DrawerView
|
||||
{...props}
|
||||
drawerBackgroundColor={drawerBackgroundColor}
|
||||
drawerLockMode={drawerLockMode}
|
||||
useNativeAnimations={useNativeAnimations}
|
||||
drawerWidth={drawerWidth}
|
||||
|
@ -125,6 +125,5 @@ export default withCachedChildNavigation(DrawerSidebar);
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
},
|
||||
});
|
||||
|
@ -36,6 +36,7 @@ export type DrawerViewConfig = {
|
||||
contentOptions?: {},
|
||||
style?: ViewStyleProp,
|
||||
useNativeAnimations?: boolean,
|
||||
drawerBackgroundColor?: String,
|
||||
};
|
||||
|
||||
type Props = DrawerViewConfig & {
|
||||
@ -160,6 +161,7 @@ export default class DrawerView<T: *> extends PureComponent<void, Props, void> {
|
||||
(this.props.screenProps && this.props.screenProps.drawerLockMode) ||
|
||||
(config && config.drawerLockMode)
|
||||
}
|
||||
drawerBackgroundColor={this.props.drawerBackgroundColor}
|
||||
drawerWidth={this.props.drawerWidth}
|
||||
onDrawerOpen={this._handleDrawerOpen}
|
||||
onDrawerClose={this._handleDrawerClose}
|
||||
|
Loading…
x
Reference in New Issue
Block a user