react-native-status-bar-height
TypeScript icon, indicating that this package has built-in type declarations

2.6.0 • Public • Published

react-native-status-bar-height

Small library that helps you to get status bar height

P.S 📱X supported ❤️

Install

$ npm install --save react-native-status-bar-height
# OR 
$ yarn add react-native-status-bar-height

Usage getStatusBarHeight(skipAndroid: boolean = false)

import { getStatusBarHeight } from 'react-native-status-bar-height';
 
// 44 - on iPhoneX
// 20 - on iOS device
// X - on Android platfrom (runtime value)
// 0 - on all other platforms (default)
console.log(getStatusBarHeight());
 
// will be 0 on Android, because You pass true to skipAndroid
console.log(getStatusBarHeight(true));

License

This project is open-sourced software licensed under the MIT License.

See the LICENSE file for more information.

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i react-native-status-bar-height

    Weekly Downloads

    44,413

    Version

    2.6.0

    License

    MIT

    Unpacked Size

    5.99 kB

    Total Files

    8

    Last publish

    Collaborators

    • ovr