mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 13:03:08 +08:00
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  Closes https://github.com/facebook/react-native/pull/10675 Differential Revision: D4137353 fbshipit-source-id: 717494fe78f8eb55c55447d6567ec8bcd0be86d3
This commit is contained in:
committed by
Facebook Github Bot
parent
1605276801
commit
a609d1c2b7
@@ -438,7 +438,7 @@ const examples = [{
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Height: {StatusBar.currentHeight} pts</Text>
|
||||
<Text>Height (Android only): {StatusBar.currentHeight} pts</Text>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user