Files
react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js
T
Emily Janzer f3b3d777ab Add view config for AndroidHorizontalScrollContentView
Summary:
Add handwritten view config for AndroidHorizontalScrollContentView. Same as RCTScrollContentView, this native component has no props of its own other than what View accepts. It's simply used as a container for the horizontal ScrollView on Android.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18284673

fbshipit-source-id: 8cd6282a3b2e5c9876da5cc0e068b12dd56acfd8
2019-11-05 19:09:03 -08:00

41 lines
1.2 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.
*
* @format
* @flow
*/
'use strict';
const registerGeneratedViewConfig = require('../../Utilities/registerGeneratedViewConfig');
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {ViewProps} from '../View/ViewPropTypes';
const AndroidHorizontalScrollContentViewViewConfig = {
uiViewClassName: 'AndroidHorizontalScrollContentView',
bubblingEventTypes: {},
directEventTypes: {},
validAttributes: {},
};
let AndroidHorizontalScrollContentViewNativeComponent;
if (global.RN$Bridgeless) {
registerGeneratedViewConfig(
'AndroidHorizontalScrollContentView',
AndroidHorizontalScrollContentViewViewConfig,
);
AndroidHorizontalScrollContentViewNativeComponent =
'AndroidHorizontalScrollContentView';
} else {
AndroidHorizontalScrollContentViewNativeComponent = requireNativeComponent<ViewProps>(
'AndroidHorizontalScrollContentView',
);
}
export default ((AndroidHorizontalScrollContentViewNativeComponent: any): HostComponent<ViewProps>);