Summary: Adds codegen component for RTCSafeAreaView(NativeComponent).

Reviewed By: rickhanlonii

Differential Revision: D15804215

fbshipit-source-id: 103312aecb35029d05412b70829dbe4668ba7768
This commit is contained in:
Rubén Norte 2019-06-14 03:10:54 -07:00 коммит произвёл Facebook Github Bot
Родитель f95a21539a
Коммит 5689302a6a
2 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -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,