Add back Header.HEIGHT but with a deprecation warning

This commit is contained in:
Brent Vatne
2017-11-03 12:14:02 -07:00
parent cba393e765
commit 580ba7dbdd
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "1.0.0-beta.17",
"version": "1.0.0-beta.18",
"description": "React Navigation",
"main": "src/react-navigation.js",
"sources": {

View File

@@ -44,10 +44,18 @@ type State = {
};
const APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56;
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 20 : 0;
const TITLE_OFFSET = Platform.OS === 'ios' ? 70 : 56;
type Props = HeaderProps & { isLandscape: boolean };
class Header extends React.PureComponent<Props, State> {
static get HEIGHT() {
console.warn(
'Header.HEIGHT is deprecated and will be removed before react-navigation comes out of beta.'
);
return APPBAR_HEIGHT + STATUSBAR_HEIGHT;
}
state = {
widths: {},
};