mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
067bcb5325
Summary: See title. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D33341775 fbshipit-source-id: be1c876375b1106d51e871805c23d345906b4631
37 lines
1.3 KiB
JavaScript
37 lines
1.3 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 MultilineTextInputNativeComponent: HostComponent<mixed> =
|
|
NativeComponentRegistry.get<mixed>('RCTMultilineTextInputView', () => ({
|
|
uiViewClassName: 'RCTMultilineTextInputView',
|
|
...RCTTextInputViewConfig,
|
|
validAttributes: {
|
|
...RCTTextInputViewConfig.validAttributes,
|
|
dataDetectorTypes: true,
|
|
},
|
|
}));
|
|
|
|
// flowlint-next-line unclear-type:off
|
|
export default ((MultilineTextInputNativeComponent: any): HostComponent<mixed>);
|