1 | # react-native-status-bar-height
|
2 |
|
3 | > Small library that helps you to get status bar height
|
4 |
|
5 | P.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
|
18 | import { 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)
|
24 | console.log(getStatusBarHeight());
|
25 |
|
26 | // will be 0 on Android, because You pass true to skipAndroid
|
27 | console.log(getStatusBarHeight(true));
|
28 | ```
|
29 |
|
30 | ## License
|
31 |
|
32 | This project is open-sourced software licensed under the MIT License.
|
33 |
|
34 | See the [LICENSE](LICENSE) file for more information.
|