mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-25 21:15:26 +08:00
refactor: use same type for animation context and interpolation props
This commit is contained in:
@@ -1,24 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import Animated from 'react-native-reanimated';
|
||||
import { Layout } from '../types';
|
||||
import { CardInterpolationProps } from '../types';
|
||||
|
||||
type StackCardAnimationContextType = {
|
||||
current: { progress: Animated.Node<number> };
|
||||
next?: { progress: Animated.Node<number> };
|
||||
index: number;
|
||||
closing: Animated.Node<0 | 1>;
|
||||
swiping: Animated.Node<0 | 1>;
|
||||
layouts: {
|
||||
screen: Layout;
|
||||
};
|
||||
insets: {
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
};
|
||||
};
|
||||
|
||||
export default React.createContext<StackCardAnimationContextType | undefined>(
|
||||
export default React.createContext<CardInterpolationProps | undefined>(
|
||||
undefined
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user