Migrate YogaPositionType enum to Kotlin (#56789)

Summary:
X-link: https://github.com/facebook/yoga/pull/1945

Pull Request resolved: https://github.com/facebook/react-native/pull/56789

Migrate YogaPositionType.java to YogaPositionType.kt by adding PositionType to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Reviewed By: fabriziocucci

Differential Revision: D104666349

fbshipit-source-id: 7f81f15000f561fc11283313f74b4ae3112c2f75
This commit is contained in:
Nicola Corti authored and meta-codesync[bot] committed 2026-05-12 18:22:02 -07:00
1 parent 14c1d164d5
commit d181829b9c
2 files changed
+29 -35

No files matched your search

@@ -1,35 +0,0 @@
/*
* 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.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaPositionType {
STATIC(0),
RELATIVE(1),
ABSOLUTE(2);
private final int mIntValue;
YogaPositionType(int intValue) {
mIntValue = intValue;
}
public int intValue() {
return mIntValue;
}
public static YogaPositionType fromInt(int value) {
switch (value) {
case 0: return STATIC;
case 1: return RELATIVE;
case 2: return ABSOLUTE;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}
}
@@ -0,0 +1,29 @@
/*
* 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.
*/
// @generated by enums.py
package com.facebook.yoga
public enum class YogaPositionType(public val intValue: Int) {
STATIC(0),
RELATIVE(1),
ABSOLUTE(2);
public fun intValue(): Int = intValue
public companion object {
@JvmStatic
public fun fromInt(value: Int): YogaPositionType =
when (value) {
0 -> STATIC
1 -> RELATIVE
2 -> ABSOLUTE
else -> throw IllegalArgumentException("Unknown enum value: $value")
}
}
}