Skip to content

Commit fbb6b68

Browse files
authored
fix: tintColor in fallback Image (DylanVann#882)
1 parent fe3fcf8 commit fbb6b68

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/__snapshots__/index.test.tsx.snap

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,18 @@ exports[`FastImage (iOS) renders Image with fallback prop 1`] = `
156156
}
157157
}
158158
style={
159-
Object {
160-
"bottom": 0,
161-
"left": 0,
162-
"position": "absolute",
163-
"right": 0,
164-
"top": 0,
165-
}
159+
Array [
160+
Object {
161+
"bottom": 0,
162+
"left": 0,
163+
"position": "absolute",
164+
"right": 0,
165+
"top": 0,
166+
},
167+
Object {
168+
"tintColor": undefined,
169+
},
170+
]
166171
}
167172
/>
168173
</View>

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {
7676
borderTopLeftRadius?: number
7777
borderTopRightRadius?: number
7878
overlayColor?: string
79-
tintColor?: string
8079
opacity?: number
8180
}
8281

@@ -179,7 +178,7 @@ function FastImageBase({
179178
<View style={[styles.imageContainer, style]} ref={forwardedRef}>
180179
<Image
181180
{...props}
182-
style={StyleSheet.absoluteFill}
181+
style={[StyleSheet.absoluteFill, { tintColor: tintColor as any }]}
183182
source={resolvedSource}
184183
defaultSource={defaultSource}
185184
onLoadStart={onLoadStart}

0 commit comments

Comments
 (0)