Skip to content

Commit fe15456

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Migrate YogaBoxSizing enum to Kotlin (#56787)
Summary: X-link: react/yoga#1941 Pull Request resolved: #56787 Migrate YogaBoxSizing.java to YogaBoxSizing.kt by adding BoxSizing to KOTLIN_ENUM_NAMES in enums.py and regenerating. Reviewed By: fabriziocucci Differential Revision: D104666350 fbshipit-source-id: 0d7464d9dc55648e54be315058f4939facec7dce
1 parent d0f1197 commit fe15456

2 files changed

Lines changed: 27 additions & 33 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaBoxSizing.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 YogaBoxSizing(public val intValue: Int) {
13+
BORDER_BOX(0),
14+
CONTENT_BOX(1);
15+
16+
public fun intValue(): Int = intValue
17+
18+
public companion object {
19+
@JvmStatic
20+
public fun fromInt(value: Int): YogaBoxSizing =
21+
when (value) {
22+
0 -> BORDER_BOX
23+
1 -> CONTENT_BOX
24+
else -> throw IllegalArgumentException("Unknown enum value: $value")
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)