From fdc24d2523b01703b42b46b1670857b7d31ce3d4 Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Fri, 30 Aug 2019 15:30:18 +0200 Subject: [PATCH] fix: rename contentContainerStyle to sceneContainerStyle for drawer --- packages/drawer/src/types.tsx | 7 +++++-- packages/drawer/src/views/Drawer.tsx | 6 +++--- packages/drawer/src/views/DrawerView.tsx | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/drawer/src/types.tsx b/packages/drawer/src/types.tsx index 7f4028d2..1724cece 100644 --- a/packages/drawer/src/types.tsx +++ b/packages/drawer/src/types.tsx @@ -75,7 +75,7 @@ export type DrawerNavigationConfig = { lazy: boolean; /** * Whether a screen should be unmounted when navigating away from it. - * Defaults to `false`.. + * Defaults to `false`. */ unmountInactiveRoutes?: boolean; /** @@ -87,7 +87,10 @@ export type DrawerNavigationConfig = { * Options for the content component which will be passed as props. */ contentOptions?: object; - contentContainerStyle?: StyleProp; + /** + * Style object for the component wrapping the screen content. + */ + sceneContainerStyle?: StyleProp; style?: StyleProp; }; diff --git a/packages/drawer/src/views/Drawer.tsx b/packages/drawer/src/views/Drawer.tsx index f075bd92..4478b3ad 100644 --- a/packages/drawer/src/views/Drawer.tsx +++ b/packages/drawer/src/views/Drawer.tsx @@ -88,7 +88,7 @@ type Props = { statusBarAnimation: 'slide' | 'none' | 'fade'; overlayStyle?: StyleProp; drawerStyle?: StyleProp; - contentContainerStyle?: StyleProp; + sceneContainerStyle?: StyleProp; renderDrawerContent: Renderer; renderSceneContent: Renderer; gestureHandlerProps?: React.ComponentProps; @@ -484,7 +484,7 @@ export default class DrawerView extends React.PureComponent { drawerPosition, drawerType, swipeEdgeWidth, - contentContainerStyle, + sceneContainerStyle, drawerStyle, overlayStyle, onGestureRef, @@ -534,7 +534,7 @@ export default class DrawerView extends React.PureComponent { { transform: [{ translateX: contentTranslateX }], }, - contentContainerStyle as any, + sceneContainerStyle as any, ]} > {renderSceneContent({ progress: this.progress })} diff --git a/packages/drawer/src/views/DrawerView.tsx b/packages/drawer/src/views/DrawerView.tsx index 3b9567a5..aa5351ec 100644 --- a/packages/drawer/src/views/DrawerView.tsx +++ b/packages/drawer/src/views/DrawerView.tsx @@ -190,7 +190,7 @@ export default class DrawerView extends React.PureComponent { drawerPosition, drawerBackgroundColor, overlayColor, - contentContainerStyle, + sceneContainerStyle, edgeWidth, minSwipeDistance, hideStatusBar, @@ -222,7 +222,7 @@ export default class DrawerView extends React.PureComponent { gestureHandlerProps={gestureHandlerProps} drawerType={drawerType} drawerPosition={drawerPosition} - contentContainerStyle={contentContainerStyle} + sceneContainerStyle={sceneContainerStyle} drawerStyle={{ backgroundColor: drawerBackgroundColor || 'white', width: this.state.drawerWidth,