RCTFabricComponentsPlugins.mm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. * @generated by an internal plugin build system
  8. */
  9. #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
  10. // OSS-compatibility layer
  11. #import "RCTFabricComponentsPlugins.h"
  12. #import <string>
  13. #import <unordered_map>
  14. Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name) {
  15. static std::unordered_map<std::string, Class (*)(void)> sFabricComponentsClassMap = {
  16. {"SafeAreaView", RCTSafeAreaViewCls},
  17. {"ScrollView", RCTScrollViewCls},
  18. {"PullToRefreshView", RCTPullToRefreshViewCls},
  19. {"ActivityIndicatorView", RCTActivityIndicatorViewCls},
  20. {"Slider", RCTSliderCls},
  21. {"Switch", RCTSwitchCls},
  22. {"UnimplementedNativeView", RCTUnimplementedNativeViewCls},
  23. {"ModalHostView", RCTModalHostViewCls},
  24. {"ARTSurfaceView", RCTARTSurfaceViewCls},
  25. {"Image", RCTImageCls},
  26. };
  27. auto p = sFabricComponentsClassMap.find(name);
  28. if (p != sFabricComponentsClassMap.end()) {
  29. auto classFunc = p->second;
  30. return classFunc();
  31. }
  32. return nil;
  33. }
  34. #endif // RN_DISABLE_OSS_PLUGIN_HEADER