diff --git a/Libraries/Components/TextInput/InputAccessoryView.js b/Libraries/Components/TextInput/InputAccessoryView.js index 10c933e2cd2..e9b8f1c6705 100644 --- a/Libraries/Components/TextInput/InputAccessoryView.js +++ b/Libraries/Components/TextInput/InputAccessoryView.js @@ -14,7 +14,7 @@ const Platform = require('../../Utilities/Platform'); const React = require('react'); const StyleSheet = require('../../StyleSheet/StyleSheet'); -const RCTInputAccessoryViewNativeComponent = require('./RCTInputAccessoryViewNativeComponent'); +import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; diff --git a/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js b/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js index f66701fc747..840ec57ca7f 100644 --- a/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +++ b/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js @@ -9,26 +9,14 @@ */ 'use strict'; -import type {NativeComponent} from '../../Renderer/shims/ReactNative'; import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; -import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; +import type {ViewProps} from '../View/ViewPropTypes'; -const React = require('react'); -const requireNativeComponent = require('../../ReactNative/requireNativeComponent'); +import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; type NativeProps = $ReadOnly<{| - +children: React.Node, - /** - * An ID which is used to associate this `InputAccessoryView` to - * specified TextInput(s). - */ - nativeID?: ?string, - style?: ?ViewStyleProp, + ...ViewProps, backgroundColor?: ?ColorValue, |}>; -type NativeInputAccessoryView = Class>; - -module.exports = ((requireNativeComponent( - 'RCTInputAccessoryView', -): any): NativeInputAccessoryView); +export default codegenNativeComponent('RCTInputAccessoryView');