diff --git a/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.java new file mode 100644 index 00000000000000..2b4be1c08d98ce --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.java @@ -0,0 +1,35 @@ +/* + * 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 YogaGutter { + COLUMN(0), + ROW(1), + ALL(2); + + private final int mIntValue; + + YogaGutter(int intValue) { + mIntValue = intValue; + } + + public int intValue() { + return mIntValue; + } + + public static YogaGutter fromInt(int value) { + switch (value) { + case 0: return COLUMN; + case 1: return ROW; + case 2: return ALL; + default: throw new IllegalArgumentException("Unknown enum value: " + value); + } + } +} diff --git a/ReactCommon/yoga/yoga/YGEnums.cpp b/ReactCommon/yoga/yoga/YGEnums.cpp index b67b0dac6dd718..3c3c0929a74f21 100644 --- a/ReactCommon/yoga/yoga/YGEnums.cpp +++ b/ReactCommon/yoga/yoga/YGEnums.cpp @@ -109,6 +109,18 @@ const char* YGFlexDirectionToString(const YGFlexDirection value) { return "unknown"; } +const char* YGGutterToString(const YGGutter value) { + switch (value) { + case YGGutterColumn: + return "column"; + case YGGutterRow: + return "row"; + case YGGutterAll: + return "all"; + } + return "unknown"; +} + const char* YGJustifyToString(const YGJustify value) { switch (value) { case YGJustifyFlexStart: diff --git a/ReactCommon/yoga/yoga/YGEnums.h b/ReactCommon/yoga/yoga/YGEnums.h index 9d6abfb1075ad6..8faec2ebb78b64 100644 --- a/ReactCommon/yoga/yoga/YGEnums.h +++ b/ReactCommon/yoga/yoga/YGEnums.h @@ -64,6 +64,12 @@ YG_ENUM_SEQ_DECL( YGFlexDirectionRow, YGFlexDirectionRowReverse) +YG_ENUM_SEQ_DECL( + YGGutter, + YGGutterColumn, + YGGutterRow, + YGGutterAll) + YG_ENUM_SEQ_DECL( YGJustify, YGJustifyFlexStart,