Files
react-native/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js
T
Ramanpreet Nara 067bcb5325 Fix SVC for RCT{Multiline,Singleline}TextInput
Summary:
See title.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D33341775

fbshipit-source-id: be1c876375b1106d51e871805c23d345906b4631
2022-01-11 14:22:14 -08:00

33 lines
1.2 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
import type {TextInputNativeCommands} from './TextInputNativeCommands';
import RCTTextInputViewConfig from './RCTTextInputViewConfig';
import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';
type NativeType = HostComponent<mixed>;
type NativeCommands = TextInputNativeCommands<NativeType>;
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['focus', 'blur', 'setTextAndSelection'],
});
const SinglelineTextInputNativeComponent: HostComponent<mixed> =
NativeComponentRegistry.get<mixed>('RCTSinglelineTextInputView', () => ({
uiViewClassName: 'RCTSinglelineTextInputView',
...RCTTextInputViewConfig,
}));
// flowlint-next-line unclear-type:off
export default ((SinglelineTextInputNativeComponent: any): HostComponent<mixed>);