Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PlatformColor in borderColor on Android #33544

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,16 @@ public static boolean isLayoutOnly(ReadableMap map, String prop) {
}
return true;
case BORDER_LEFT_COLOR:
return !map.isNull(BORDER_LEFT_COLOR) && map.getInt(BORDER_LEFT_COLOR) == Color.TRANSPARENT;
return map.getType(BORDER_LEFT_COLOR) == ReadableType.Number
&& map.getInt(BORDER_LEFT_COLOR) == Color.TRANSPARENT;
case BORDER_RIGHT_COLOR:
return !map.isNull(BORDER_RIGHT_COLOR)
return map.getType(BORDER_RIGHT_COLOR) == ReadableType.Number
&& map.getInt(BORDER_RIGHT_COLOR) == Color.TRANSPARENT;
case BORDER_TOP_COLOR:
return !map.isNull(BORDER_TOP_COLOR) && map.getInt(BORDER_TOP_COLOR) == Color.TRANSPARENT;
return map.getType(BORDER_TOP_COLOR) == ReadableType.Number
&& map.getInt(BORDER_TOP_COLOR) == Color.TRANSPARENT;
case BORDER_BOTTOM_COLOR:
return !map.isNull(BORDER_BOTTOM_COLOR)
return map.getType(BORDER_BOTTOM_COLOR) == ReadableType.Number
&& map.getInt(BORDER_BOTTOM_COLOR) == Color.TRANSPARENT;
case BORDER_WIDTH:
return map.isNull(BORDER_WIDTH) || map.getDouble(BORDER_WIDTH) == 0d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ function FallbackColorsExample() {
style={{
...styles.colorCell,
backgroundColor: color.color,
borderColor: color.color,
}}
/>
</View>
Expand Down