mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-11 17:30:51 +08:00
refactor: move more header stuff to elements package
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export default React.createContext<number | undefined>(undefined);
|
||||
@@ -1,5 +0,0 @@
|
||||
import * as React from 'react';
|
||||
|
||||
const HeaderShownContext = React.createContext(false);
|
||||
|
||||
export default HeaderShownContext;
|
||||
@@ -1,14 +0,0 @@
|
||||
import * as React from 'react';
|
||||
import HeaderHeightContext from './HeaderHeightContext';
|
||||
|
||||
export default function useFloatingHeaderHeight() {
|
||||
const height = React.useContext(HeaderHeightContext);
|
||||
|
||||
if (height === undefined) {
|
||||
throw new Error(
|
||||
"Couldn't find the header height. Are you inside a screen in Stack?"
|
||||
);
|
||||
}
|
||||
|
||||
return height;
|
||||
}
|
||||
Reference in New Issue
Block a user