ScrollContentViewNativeComponent.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. * @flow
  9. */
  10. 'use strict';
  11. const registerGeneratedViewConfig = require('../../Utilities/registerGeneratedViewConfig');
  12. const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
  13. import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
  14. import type {ViewProps} from '../View/ViewPropTypes';
  15. const ScrollContentViewViewConfig = {
  16. uiViewClassName: 'RCTScrollContentView',
  17. bubblingEventTypes: {},
  18. directEventTypes: {},
  19. validAttributes: {},
  20. };
  21. let ScrollContentViewNativeComponent;
  22. if (global.RN$Bridgeless) {
  23. registerGeneratedViewConfig(
  24. 'RCTScrollContentView',
  25. ScrollContentViewViewConfig,
  26. );
  27. ScrollContentViewNativeComponent = 'RCTScrollContentView';
  28. } else {
  29. ScrollContentViewNativeComponent = requireNativeComponent<ViewProps>(
  30. 'RCTScrollContentView',
  31. );
  32. }
  33. export default ((ScrollContentViewNativeComponent: any): HostComponent<ViewProps>);