UNPKG

@fto-consult/expo-ui

Version:

Bibliothèque de composants UI Expo,react-native

20 lines (18 loc) • 569 B
import { SharedTransition, withSpring, } from 'react-native-reanimated' const SPRING_CONFIG = { mass: 1, stiffness: 100, damping: 200, } export const sharedElementTransition = SharedTransition.custom((values) => { 'worklet' return { height: withSpring(values.targetHeight, SPRING_CONFIG), width: withSpring(values.targetWidth, SPRING_CONFIG), originX: withSpring(values.targetGlobalOriginX, SPRING_CONFIG), originY: withSpring(values.targetGlobalOriginY, SPRING_CONFIG), } })