UNPKG

786 BMarkdownView Raw
1# react-native-status-bar-height
2
3> Small library that helps you to get status bar height
4
5P.S :iphone:X supported :heart:
6
7## Install
8
9```bash
10$ npm install --save react-native-status-bar-height
11# OR
12$ yarn add react-native-status-bar-height
13```
14
15## Usage getStatusBarHeight(skipAndroid: boolean = false)
16
17```js
18import { getStatusBarHeight } from 'react-native-status-bar-height';
19
20// 44 - on iPhoneX
21// 20 - on iOS device
22// X - on Android platfrom (runtime value)
23// 0 - on all other platforms (default)
24console.log(getStatusBarHeight());
25
26// will be 0 on Android, because You pass true to skipAndroid
27console.log(getStatusBarHeight(true));
28```
29
30## License
31
32This project is open-sourced software licensed under the MIT License.
33
34See the [LICENSE](LICENSE) file for more information.