mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-26 01:04:20 +08:00
refactor: remove cardTransparent in favor of cardStyle
This commit is contained in:
@@ -14,9 +14,9 @@ const DragLimitedToModal: NavigationStackScreenComponent = () => (
|
||||
);
|
||||
|
||||
DragLimitedToModal.navigationOptions = {
|
||||
cardStyle: { backgroundColor: 'transparent' },
|
||||
gestureDirection: 'vertical',
|
||||
gestureResponseDistance: { vertical: HEIGHT },
|
||||
cardTransparent: true,
|
||||
cardStyleInterpolator: ({ current }) => {
|
||||
const translateY = interpolate(current.progress, {
|
||||
inputRange: [0, 1],
|
||||
|
||||
@@ -114,9 +114,9 @@ export default createStackNavigator(
|
||||
Transparent: {
|
||||
screen: TransparentScreen,
|
||||
navigationOptions: {
|
||||
cardStyle: { backgroundColor: 'transparent' },
|
||||
headerShown: false,
|
||||
gestureEnabled: false,
|
||||
cardTransparent: true,
|
||||
transitionSpec: {
|
||||
open: TransitionSpecs.TransitionIOSSpec,
|
||||
close: TransitionSpecs.TransitionIOSSpec,
|
||||
|
||||
@@ -72,8 +72,8 @@ export default createStackNavigator(
|
||||
mode: 'modal',
|
||||
headerMode: 'none',
|
||||
defaultNavigationOptions: {
|
||||
cardStyle: { backgroundColor: 'transparent' },
|
||||
gestureEnabled: false,
|
||||
cardTransparent: true,
|
||||
cardStyleInterpolator: ({ current: { progress } }) => {
|
||||
const opacity = Animated.interpolate(progress, {
|
||||
inputRange: [0, 0.5, 0.9, 1],
|
||||
|
||||
Reference in New Issue
Block a user