Migrate YogaGridTrackType enum to Kotlin (#56786)

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

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

Migrate YogaGridTrackType.java to YogaGridTrackType.kt by adding GridTrackType to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Reviewed By: fabriziocucci

Differential Revision: D104666336

fbshipit-source-id: 4b2966b14f09bfce9a64854bbfe161b7849195a8
This commit is contained in:
Nicola Corti authored and meta-codesync[bot] committed 2026-05-12 07:48:48 -07:00
1 parent 984621b212
commit f1b488f5da
2 files changed
+33 -39

No files matched your search

@@ -1,39 +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 YogaGridTrackType {
AUTO(0),
POINTS(1),
PERCENT(2),
FR(3),
MINMAX(4);
private final int mIntValue;
YogaGridTrackType(int intValue) {
mIntValue = intValue;
}
public int intValue() {
return mIntValue;
}
public static YogaGridTrackType fromInt(int value) {
switch (value) {
case 0: return AUTO;
case 1: return POINTS;
case 2: return PERCENT;
case 3: return FR;
case 4: return MINMAX;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}
}
@@ -0,0 +1,33 @@
/*
* 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 YogaGridTrackType(public val intValue: Int) {
AUTO(0),
POINTS(1),
PERCENT(2),
FR(3),
MINMAX(4);
public fun intValue(): Int = intValue
public companion object {
@JvmStatic
public fun fromInt(value: Int): YogaGridTrackType =
when (value) {
0 -> AUTO
1 -> POINTS
2 -> PERCENT
3 -> FR
4 -> MINMAX
else -> throw IllegalArgumentException("Unknown enum value: $value")
}
}
}