feat: expose header height in context

This commit is contained in:
Satyajit Sahoo
2020-01-05 14:07:16 +01:00
parent a9e584c3b7
commit 133b59cd17
9 changed files with 99 additions and 44 deletions

View File

@@ -0,0 +1,14 @@
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;
}