Skip to content

Commit 28552a9

Browse files
chore: Removed custom logic for extracting RGB and alpha components, as the new setBorderColor method handles it internally. (#941)
Co-authored-by: Dmitry Belov <[email protected]>
1 parent d3a02e7 commit 28552a9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

android/src/main/java/com/reactnativemenu/MenuViewManager.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ class MenuViewManager: ReactClippingViewManager<MenuView>() {
152152

153153
@ReactPropGroup(names = [ViewProps.BORDER_COLOR, ViewProps.BORDER_LEFT_COLOR, ViewProps.BORDER_RIGHT_COLOR, ViewProps.BORDER_TOP_COLOR, ViewProps.BORDER_BOTTOM_COLOR, ViewProps.BORDER_START_COLOR, ViewProps.BORDER_END_COLOR], customType = "Color")
154154
fun setBorderColor(view: ReactViewGroup, index: Int, color: Int?) {
155-
val rgbComponent = if (color == null) YogaConstants.UNDEFINED else (color and 0x00FFFFFF).toFloat()
156-
val alphaComponent = if (color == null) YogaConstants.UNDEFINED else (color ushr 24).toFloat()
157-
view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent)
155+
view.setBorderColor(index, color)
158156
}
159157

160158
@ReactProp(name = ViewProps.OVERFLOW)

0 commit comments

Comments
 (0)