1 | import * as React from 'react';
|
2 |
|
3 | import CardAnimationContext from './CardAnimationContext';
|
4 |
|
5 | export default function useCardAnimation() {
|
6 | const animation = React.useContext(CardAnimationContext);
|
7 |
|
8 | if (animation === undefined) {
|
9 | throw new Error(
|
10 | "Couldn't find values for card animation. Are you inside a screen in Stack?"
|
11 | );
|
12 | }
|
13 |
|
14 | return animation;
|
15 | }
|