@expo/status-bar-height
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/expo__status-bar-height package

0.0.1 • Public • Published

NPM

@expo/status-bar-height

Listen to status bar changes during incoming calls and other multi-tasking events 💙

Installation

yarn add @expo/status-bar-height

Usage

Import the library into your JavaScript file:

import StatusBarHeight from '@expo/status-bar-height';

Functions

StatusBarHeight.addEventListener( (height: number) => {} )

Given a callback this will be invoked whenever the status bar height changes. The status bar height changes when another app is running a background activity.

  • Phone Calls
  • Navigating
  • Facetime

StatusBarHeight.removeEventListener( (height: number) => {} )

The provided function will stop receiving updates

StatusBarHeight.getAsync(): Promise<number>

Get the current height of the status bar async.

const height = await StatusBarHeight.getAsync();

/@expo/status-bar-height/

    Package Sidebar

    Install

    npm i @expo/status-bar-height

    Weekly Downloads

    501

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    9.92 kB

    Total Files

    4

    Last publish

    Collaborators

    • schestakov
    • janicduplessis
    • wkozyra
    • barthec
    • quinlanj
    • sjchmiela
    • tsapeta
    • dsokal
    • esamelson
    • expoadmin
    • ide
    • brentvatne
    • nikki93
    • ccheever
    • terribleben
    • jesseruder
    • fson
    • evanbacon