Skip to content

Commit d93acdd

Browse files
committed
Add back Header.HEIGHT but with a deprecation warning
1 parent b9d1d0d commit d93acdd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-navigation",
3-
"version": "1.0.0-beta.17",
3+
"version": "1.0.0-beta.18",
44
"description": "React Navigation",
55
"main": "src/react-navigation.js",
66
"sources": {

src/views/Header/Header.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,18 @@ type State = {
4444
};
4545

4646
const APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56;
47+
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 20 : 0;
4748
const TITLE_OFFSET = Platform.OS === 'ios' ? 70 : 56;
4849

4950
type Props = HeaderProps & { isLandscape: boolean };
5051
class Header extends React.PureComponent<Props, State> {
52+
static get HEIGHT() {
53+
console.warn(
54+
'Header.HEIGHT is deprecated and will be removed before react-navigation comes out of beta.'
55+
);
56+
return APPBAR_HEIGHT + STATUSBAR_HEIGHT;
57+
}
58+
5159
state = {
5260
widths: {},
5361
};

0 commit comments

Comments
 (0)