Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: rename contentContainerStyle to sceneContainerStyle for drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Aug 30, 2019
1 parent 6a8242c commit fdc24d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions packages/drawer/src/types.tsx
Expand Up @@ -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;
/**
Expand All @@ -87,7 +87,10 @@ export type DrawerNavigationConfig = {
* Options for the content component which will be passed as props.
*/
contentOptions?: object;
contentContainerStyle?: StyleProp<ViewStyle>;
/**
* Style object for the component wrapping the screen content.
*/
sceneContainerStyle?: StyleProp<ViewStyle>;
style?: StyleProp<ViewStyle>;
};

Expand Down
6 changes: 3 additions & 3 deletions packages/drawer/src/views/Drawer.tsx
Expand Up @@ -88,7 +88,7 @@ type Props = {
statusBarAnimation: 'slide' | 'none' | 'fade';
overlayStyle?: StyleProp<ViewStyle>;
drawerStyle?: StyleProp<ViewStyle>;
contentContainerStyle?: StyleProp<ViewStyle>;
sceneContainerStyle?: StyleProp<ViewStyle>;
renderDrawerContent: Renderer;
renderSceneContent: Renderer;
gestureHandlerProps?: React.ComponentProps<typeof PanGestureHandler>;
Expand Down Expand Up @@ -484,7 +484,7 @@ export default class DrawerView extends React.PureComponent<Props> {
drawerPosition,
drawerType,
swipeEdgeWidth,
contentContainerStyle,
sceneContainerStyle,
drawerStyle,
overlayStyle,
onGestureRef,
Expand Down Expand Up @@ -534,7 +534,7 @@ export default class DrawerView extends React.PureComponent<Props> {
{
transform: [{ translateX: contentTranslateX }],
},
contentContainerStyle as any,
sceneContainerStyle as any,
]}
>
{renderSceneContent({ progress: this.progress })}
Expand Down
4 changes: 2 additions & 2 deletions packages/drawer/src/views/DrawerView.tsx
Expand Up @@ -190,7 +190,7 @@ export default class DrawerView extends React.PureComponent<Props, State> {
drawerPosition,
drawerBackgroundColor,
overlayColor,
contentContainerStyle,
sceneContainerStyle,
edgeWidth,
minSwipeDistance,
hideStatusBar,
Expand Down Expand Up @@ -222,7 +222,7 @@ export default class DrawerView extends React.PureComponent<Props, State> {
gestureHandlerProps={gestureHandlerProps}
drawerType={drawerType}
drawerPosition={drawerPosition}
contentContainerStyle={contentContainerStyle}
sceneContainerStyle={sceneContainerStyle}
drawerStyle={{
backgroundColor: drawerBackgroundColor || 'white',
width: this.state.drawerWidth,
Expand Down

0 comments on commit fdc24d2

Please sign in to comment.