fix: slide the header up to hide it for vertical animation

This commit is contained in:
Satyajit Sahoo
2020-01-18 04:13:37 +01:00
parent fe82276b1f
commit 43d2c456be
4 changed files with 52 additions and 3 deletions

View File

@@ -175,6 +175,7 @@ function CardContainer({
scenes: [previousScene, scene],
state,
getPreviousRoute,
gestureDirection,
styleInterpolator: headerStyleInterpolator,
onContentHeightChange: onHeaderHeightChange,
})

View File

@@ -548,6 +548,10 @@ export default class CardStack extends React.Component<Props, State> {
state,
getPreviousRoute,
onContentHeightChange: this.handleHeaderLayout,
gestureDirection:
focusedOptions.gestureDirection !== undefined
? focusedOptions.gestureDirection
: defaultTransitionPreset.gestureDirection,
styleInterpolator:
focusedOptions.headerStyleInterpolator !== undefined
? focusedOptions.headerStyleInterpolator