mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 17:47:32 +08:00
15 lines
369 B
TypeScript
15 lines
369 B
TypeScript
import * as React from 'react';
|
|
import CardAnimationContext from './CardAnimationContext';
|
|
|
|
export default function useCardAnimation() {
|
|
const animation = React.useContext(CardAnimationContext);
|
|
|
|
if (animation === undefined) {
|
|
throw new Error(
|
|
"Couldn't find values for card animation. Are you inside a screen in Stack?"
|
|
);
|
|
}
|
|
|
|
return animation;
|
|
}
|