Add native view config for inset props

Summary:
The insets props were introduced in this diff: D42193661

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D56849870

fbshipit-source-id: 7be2a5825086ac954fdb8bc3bb86b57a2fa6d326
This commit is contained in:
Ramanpreet Nara
2024-05-02 12:46:05 -07:00
committed by Facebook GitHub Bot
parent 8c3f8a3e6b
commit 063ae7d3e8
3 changed files with 77 additions and 0 deletions
@@ -482,6 +482,55 @@ RCT_EXPORT_SHADOW_PROPERTY(borderStartWidth, float)
RCT_EXPORT_SHADOW_PROPERTY(borderEndWidth, float)
RCT_EXPORT_SHADOW_PROPERTY(borderWidth, float)
RCT_CUSTOM_SHADOW_PROPERTY(inset, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetBlock, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetBlockStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetBlockEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetInline, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetInlineStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(insetInlineEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_EXPORT_SHADOW_PROPERTY(marginTop, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(marginRight, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(marginBottom, YGValue)
@@ -4145,6 +4145,9 @@ public class com/facebook/react/uimanager/LayoutShadowNode : com/facebook/react/
public fun setFlexWrap (Ljava/lang/String;)V
public fun setGap (Lcom/facebook/react/bridge/Dynamic;)V
public fun setHeight (Lcom/facebook/react/bridge/Dynamic;)V
public fun setInset (Lcom/facebook/react/bridge/Dynamic;)V
public fun setInsetBlock (ILcom/facebook/react/bridge/Dynamic;)V
public fun setInsetInline (ILcom/facebook/react/bridge/Dynamic;)V
public fun setJustifyContent (Ljava/lang/String;)V
public fun setLayoutConformance (Ljava/lang/String;)V
public fun setMargins (ILcom/facebook/react/bridge/Dynamic;)V
@@ -717,6 +717,31 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
}
}
@ReactPropGroup(
names = {
"insetBlock",
"insetBlockEnd",
"insetBlockStart",
})
public void setInsetBlock(int index, Dynamic inset) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
"insetInline",
"insetInlineEnd",
"insetInlineStart",
})
public void setInsetInline(int index, Dynamic inset) {
// Do Nothing: Align with static ViewConfigs
}
@ReactProp(name = "inset")
public void setInset(Dynamic inset) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
ViewProps.MARGIN,