mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
38cfa93775
Summary: Changelog: [Internal] Reviewed By: fred2028 Differential Revision: D27501270 fbshipit-source-id: 1d447017e862baf834310650778f2abbff50945c
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict-local
|
|
*/
|
|
|
|
import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
|
|
import NativeStatusBarManagerIOS from './NativeStatusBarManagerIOS';
|
|
import Platform from '../../Utilities/Platform';
|
|
|
|
type StatusBarFrameChangeEvent = {
|
|
frame: {
|
|
x: number,
|
|
y: number,
|
|
width: number,
|
|
height: number,
|
|
},
|
|
};
|
|
|
|
type StatusBarIOSEventDefinitions = {
|
|
statusBarFrameDidChange: [StatusBarFrameChangeEvent],
|
|
statusBarFrameWillChange: [StatusBarFrameChangeEvent],
|
|
};
|
|
|
|
/**
|
|
* Use `StatusBar` for mutating the status bar.
|
|
*/
|
|
class StatusBarIOS extends NativeEventEmitter<StatusBarIOSEventDefinitions> {}
|
|
|
|
module.exports = (new StatusBarIOS(
|
|
// T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
|
|
// If you want to use the native module on other platforms, please remove this condition and test its behavior
|
|
Platform.OS !== 'ios' ? null : NativeStatusBarManagerIOS,
|
|
): StatusBarIOS);
|