From a609d1c2b78fb2493935b065afa52413313ea199 Mon Sep 17 00:00:00 2001 From: Ben Griffith Date: Sat, 5 Nov 2016 17:03:02 -0700 Subject: [PATCH] Add currentHeight constant to status bar docs Summary: This PR is to fix #10561 by adding `currentHeight` to a list of constants for the `StatusBar` component. It also makes it clear that this constant is Android only by also adding a further note to the example use. Closes #10561 ![screen shot 2016-11-01 at 12 37 06](https://cloud.githubusercontent.com/assets/2854338/19889978/f453d43a-a02f-11e6-859e-5a9ebeba9d44.png) Closes https://github.com/facebook/react-native/pull/10675 Differential Revision: D4137353 fbshipit-source-id: 717494fe78f8eb55c55447d6567ec8bcd0be86d3 --- Examples/UIExplorer/js/StatusBarExample.js | 2 +- Libraries/Components/StatusBar/StatusBar.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Examples/UIExplorer/js/StatusBarExample.js b/Examples/UIExplorer/js/StatusBarExample.js index e1f90c192..8c60b22ba 100644 --- a/Examples/UIExplorer/js/StatusBarExample.js +++ b/Examples/UIExplorer/js/StatusBarExample.js @@ -438,7 +438,7 @@ const examples = [{ render() { return ( - Height: {StatusBar.currentHeight} pts + Height (Android only): {StatusBar.currentHeight} pts ); }, diff --git a/Libraries/Components/StatusBar/StatusBar.js b/Libraries/Components/StatusBar/StatusBar.js index 63a3ca47f..f1712b4a5 100644 --- a/Libraries/Components/StatusBar/StatusBar.js +++ b/Libraries/Components/StatusBar/StatusBar.js @@ -131,6 +131,10 @@ function createStackEntry(props: any): any { * to use the static API and the component for the same prop because any value * set by the static API will get overriden by the one set by the component in * the next render. + * + * ### Constants + * + * `currentHeight` (Android only) The height of the status bar. */ class StatusBar extends React.Component { props: {