Skip to content

Commit 70ebd43

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Migrate YogaExperimentalFeature enum to Kotlin (#56797)
Summary: X-link: react/yoga#1946 Pull Request resolved: #56797 Migrate YogaExperimentalFeature.java to YogaExperimentalFeature.kt by adding ExperimentalFeature to KOTLIN_ENUM_NAMES in enums.py and regenerating. Reviewed By: fabriziocucci Differential Revision: D104666330 fbshipit-source-id: 803d54b16697015b4ddf91d1c145179e9635b183
1 parent d695a5c commit 70ebd43

2 files changed

Lines changed: 27 additions & 33 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and 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+
8+
// @generated by enums.py
9+
10+
package com.facebook.yoga
11+
12+
public enum class YogaExperimentalFeature(public val intValue: Int) {
13+
WEB_FLEX_BASIS(0),
14+
FIX_FLEX_BASIS_FIT_CONTENT(1);
15+
16+
public fun intValue(): Int = intValue
17+
18+
public companion object {
19+
@JvmStatic
20+
public fun fromInt(value: Int): YogaExperimentalFeature =
21+
when (value) {
22+
0 -> WEB_FLEX_BASIS
23+
1 -> FIX_FLEX_BASIS_FIT_CONTENT
24+
else -> throw IllegalArgumentException("Unknown enum value: $value")
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)