项目
在 GitHub 查看 Usage
ovr/react-native-status-bar-height
关于
一个用于获取状态栏高度的小型库。另:支持 📱X ❤️
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文react-native-status-bar-height
Small library that helps you to get status bar height
P.S. iPhone X supported :heart:
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 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 file for more information.
探索相关项目
加载中…