transition for web too!
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {StyleProp, ViewStyle} from 'react-native'
|
import {StyleProp, ViewStyle} from 'react-native'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
|
FadeIn,
|
||||||
FadeOut,
|
FadeOut,
|
||||||
SlideInLeft,
|
SlideInLeft,
|
||||||
SlideInRight,
|
SlideInRight,
|
||||||
} from 'react-native-reanimated'
|
} from 'react-native-reanimated'
|
||||||
|
|
||||||
|
import {isWeb} from 'platform/detection'
|
||||||
|
|
||||||
export function ScreenTransition({
|
export function ScreenTransition({
|
||||||
direction,
|
direction,
|
||||||
style,
|
style,
|
||||||
@@ -19,7 +22,7 @@ export function ScreenTransition({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
entering={entering}
|
entering={isWeb ? FadeIn.duration(90) : entering}
|
||||||
exiting={FadeOut.duration(90)} // Totally vibes based
|
exiting={FadeOut.duration(90)} // Totally vibes based
|
||||||
style={style}>
|
style={style}>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user