mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c7f259526b
Summary: Changelog: Move from setNativeProps to ViewCommands. Reviewed By: JoshuaGross Differential Revision: D20843018 fbshipit-source-id: 9be9d2bbee01f2e15279e3c3ae785c1a5b163765
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its 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
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
|
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
|
|
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
|
|
import type {Int32} from '../../Types/CodegenTypes';
|
|
import type {TextInputNativeCommands} from './TextInputNativeCommands';
|
|
import * as React from 'react';
|
|
|
|
type NativeType = HostComponent<mixed>;
|
|
|
|
type NativeCommands = TextInputNativeCommands<NativeType>;
|
|
|
|
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
supportedCommands: [
|
|
'focus',
|
|
'blur',
|
|
'setMostRecentEventCount',
|
|
'setTextAndSelection',
|
|
],
|
|
});
|
|
|
|
const SinglelineTextInputNativeComponent: HostComponent<mixed> = requireNativeComponent<mixed>(
|
|
'RCTMultilineTextInputView',
|
|
);
|
|
|
|
export default SinglelineTextInputNativeComponent;
|