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
This commit is contained in:
Ben Griffith 2016-11-05 17:03:02 -07:00 committed by Facebook Github Bot
parent 1605276801
commit a609d1c2b7
2 changed files with 5 additions and 1 deletions

View File

@ -438,7 +438,7 @@ const examples = [{
render() { render() {
return ( return (
<View> <View>
<Text>Height: {StatusBar.currentHeight} pts</Text> <Text>Height (Android only): {StatusBar.currentHeight} pts</Text>
</View> </View>
); );
}, },

View File

@ -131,6 +131,10 @@ function createStackEntry(props: any): any {
* to use the static API and the component for the same prop because any value * 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 * set by the static API will get overriden by the one set by the component in
* the next render. * the next render.
*
* ### Constants
*
* `currentHeight` (Android only) The height of the status bar.
*/ */
class StatusBar extends React.Component { class StatusBar extends React.Component {
props: { props: {