Add RTCSafeAreaView
Summary: Adds codegen component for RTCSafeAreaView(NativeComponent). Reviewed By: rickhanlonii Differential Revision: D15804215 fbshipit-source-id: 103312aecb35029d05412b70829dbe4668ba7768
This commit is contained in:
Родитель
f95a21539a
Коммит
5689302a6a
|
@ -5,21 +5,21 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
'use strict';
|
||||
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {NativeComponent} from '../../Renderer/shims/ReactNative';
|
||||
import type {WithDefault} from '../../Types/CodegenTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
emulateUnlessSupported?: boolean,
|
||||
|
||||
// Props
|
||||
emulateUnlessSupported?: WithDefault<boolean, false>,
|
||||
|}>;
|
||||
|
||||
type RCTSafeAreaViewNativeType = Class<NativeComponent<NativeProps>>;
|
||||
|
||||
module.exports = ((requireNativeComponent(
|
||||
'RCTSafeAreaView',
|
||||
): any): RCTSafeAreaViewNativeType);
|
||||
export default codegenNativeComponent<NativeProps>('RCTSafeAreaView');
|
||||
|
|
|
@ -44,7 +44,8 @@ if (Platform.OS === 'android') {
|
|||
SafeAreaViewRef.displayName = 'SafeAreaView';
|
||||
exported = ((SafeAreaViewRef: any): Class<React.Component<Props>>);
|
||||
} else {
|
||||
const RCTSafeAreaViewNativeComponent = require('./RCTSafeAreaViewNativeComponent');
|
||||
const RCTSafeAreaViewNativeComponent = require('./RCTSafeAreaViewNativeComponent')
|
||||
.default;
|
||||
|
||||
const SafeAreaView = (
|
||||
props: Props,
|
||||
|
|
Загрузка…
Ссылка в новой задаче