Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ovr/react-native-status-bar-height
Small library that helps you to get status bar height, P.S 📱X supported ❤️
https://github.com/ovr/react-native-status-bar-height
Last synced: 13 days ago
JSON representation
Small library that helps you to get status bar height, P.S 📱X supported ❤️
- Host: GitHub
- URL: https://github.com/ovr/react-native-status-bar-height
- Owner: ovr
- License: mit
- Created: 2017-09-24T08:34:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T19:28:51.000Z (over 1 year ago)
- Last Synced: 2024-10-04T10:10:39.555Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 820 KB
- Stars: 464
- Watchers: 9
- Forks: 58
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-status-bar-height ★73 - A small library that helps you to get status bar height easily. It also support iPhone X. (Components / UI)
- awesome-react-native - react-native-status-bar-height ★73 - A small library that helps you to get status bar height easily. It also support iPhone X. (Components / UI)
- awesome-react-native - react-native-status-bar-height ★73 - A small library that helps you to get status bar height easily. It also support iPhone X. (Components / UI)
- awesome-react-native - react-native-status-bar-height ★73 - A small library that helps you to get status bar height easily. It also support iPhone X. (Components / UI)
README
# react-native-status-bar-height
> Small library that helps you to get status bar height
P.S. iPhone X supported :heart:
## Install
```bash
$ npm install --save react-native-status-bar-height
# OR
$ yarn add react-native-status-bar-height
```## Usage `getStatusBarHeight(skipAndroid: boolean = false)`
```js
import { getStatusBarHeight } from 'react-native-status-bar-height';// 44 - on iPhone X
// 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](LICENSE) file for more information.