Closed
Description
Hi!
I used an Image
component with a border color like this:
const CustomImage = styled.Image`
border-color: #EDF1F7;
`;
But I face the following warning. Indeed, it looks like this package transforms borderColor
to four properties borderTopColor
etc.
Which does not work with the Image component style API https://reactnative.dev/docs/image-style-props#bordercolor
Any idea on how we could solve this?
ERROR Warning: Failed prop type: Invalid props.style key `borderTopColor` supplied to `Image`.
Bad object: {
"borderTopWidth": 5,
"borderRightWidth": 5,
"borderBottomWidth": 5,
"borderLeftWidth": 5,
"borderTopColor": "#EDF1F7",
"borderRightColor": "#EDF1F7",
"borderBottomColor": "#EDF1F7",
"borderLeftColor": "#EDF1F7",
"width": 200,
"height": 200,
"borderTopLeftRadius": 200,
"borderTopRightRadius": 200,
"borderBottomRightRadius": 200,
"borderBottomLeftRadius": 200
}
Valid keys: [
"display",
"width",
"height",
"start",
"end",
"top",
"left",
"right",
"bottom",
"minWidth",
"maxWidth",
"minHeight",
"maxHeight",
"margin",
"marginVertical",
"marginHorizontal",
"marginTop",
"marginBottom",
"marginLeft",
"marginRight",
"marginStart",
"marginEnd",
"padding",
"paddingVertical",
"paddingHorizontal",
"paddingTop",
"paddingBottom",
"paddingLeft",
"paddingRight",
"paddingStart",
"paddingEnd",
"borderWidth",
"borderTopWidth",
"borderStartWidth",
"borderEndWidth",
"borderRightWidth",
"borderBottomWidth",
"borderLeftWidth",
"position",
"flexDirection",
"flexWrap",
"justifyContent",
"alignItems",
"alignSelf",
"alignContent",
"overflow",
"flex",
"flexGrow",
"flexShrink",
"flexBasis",
"aspectRatio",
"zIndex",
"direction",
"shadowColor",
"shadowOffset",
"shadowOpacity",
"shadowRadius",
"transform",
"transformMatrix",
"decomposedMatrix",
"scaleX",
"scaleY",
"rotation",
"translateX",
"translateY",
"resizeMode",
"backfaceVisibility",
"backgroundColor",
"borderColor",
"borderRadius",
"tintColor",
"opacity",
"overlayColor",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomLeftRadius",
"borderBottomRightRadius"
]
Metadata
Metadata
Assignees
Labels
No labels