Skip to content

Commit

Permalink
fix: tintColor in fallback Image (DylanVann#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiggag authored Oct 31, 2022
1 parent fe3fcf8 commit fbb6b68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
19 changes: 12 additions & 7 deletions src/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,18 @@ exports[`FastImage (iOS) renders Image with fallback prop 1`] = `
}
}
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
Object {
"tintColor": undefined,
},
]
}
/>
</View>
Expand Down
3 changes: 1 addition & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {
borderTopLeftRadius?: number
borderTopRightRadius?: number
overlayColor?: string
tintColor?: string
opacity?: number
}

Expand Down Expand Up @@ -179,7 +178,7 @@ function FastImageBase({
<View style={[styles.imageContainer, style]} ref={forwardedRef}>
<Image
{...props}
style={StyleSheet.absoluteFill}
style={[StyleSheet.absoluteFill, { tintColor: tintColor as any }]}
source={resolvedSource}
defaultSource={defaultSource}
onLoadStart={onLoadStart}
Expand Down

0 comments on commit fbb6b68

Please sign in to comment.