type AnimationWrapperProps = ViewProps &
Pick<AnimateProps<ViewProps>, 'entering' | 'exiting'> &
Pick<PressableProps, 'onPress'>;
const AnimationWrapper = ({ children, onPress, ...rest }: AnimationWrapperProps) => {
return (
<Animated.View {...rest}>
<Pressable onPress={onPress}>{children}</Pressable>
</Animated.View>
);
};
export default AnimationWrapper;
type AnimationWrapperProps = ViewProps &
Pick<AnimateProps<ViewProps>, 'entering' | 'exiting'> &
Pick<PressableProps, 'onPress'>;
const AnimationWrapper = ({ children, onPress, ...rest }: AnimationWrapperProps) => {
return (
<Animated.View {...rest}>
<Pressable onPress={onPress}>{children}</Pressable>
</Animated.View>
);
};
export default AnimationWrapper;