-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xplat/js/react-native-github/packages/react-native/ReactAndroid/src/m…
…ain/java/com/facebook/react/fabric/FabricComponents.java (#45673) Summary: Pull Request resolved: #45673 Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D60233417 fbshipit-source-id: f5506b8d2bf0e2246c8578c0c1c13ddd62507ee0
- Loading branch information
1 parent
87ff232
commit 77dfa43
Showing
3 changed files
with
47 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
...s/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricComponents.java
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...ges/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricComponents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package com.facebook.react.fabric | ||
|
||
/** | ||
* Utility class for Fabric components, this will be removed | ||
* | ||
* TODO T97384889: remove this class when the component names are unified between JS - Android - | ||
* iOS - C++ | ||
*/ | ||
public object FabricComponents { | ||
|
||
// TODO T97384889: unify component names between JS - Android - iOS - C++ | ||
private val componentNames: Map<String, String> = | ||
mapOf( | ||
"View" to "RCTView", | ||
"Image" to "RCTImageView", | ||
"ScrollView" to "RCTScrollView", | ||
"Slider" to "RCTSlider", | ||
"ModalHostView" to "RCTModalHostView", | ||
"Paragraph" to "RCTText", | ||
"Text" to "RCText", | ||
"RawText" to "RCTRawText", | ||
"ActivityIndicatorView" to "AndroidProgressBar", | ||
"ShimmeringView" to "RKShimmeringView", | ||
"TemplateView" to "RCTTemplateView", | ||
"AxialGradientView" to "RCTAxialGradientView", | ||
"Video" to "RCTVideo", | ||
"Map" to "RCTMap", | ||
"WebView" to "RCTWebView", | ||
"Keyframes" to "RCTKeyframes", | ||
"ImpressionTrackingView" to "RCTImpressionTrackingView", | ||
) | ||
|
||
/** @return the name of component in the Fabric environment */ | ||
@JvmStatic | ||
public fun getFabricComponentName(componentName: String): String = | ||
componentNames.get(componentName) ?: componentName | ||
} |