mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 22:51:57 +08:00
Add back Header.HEIGHT but with a deprecation warning
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user