Skip to content

Commit 54376d8

Browse files
authored
fix: use ColorValue type (DylanVann#939)
1 parent fbb6b68 commit 54376d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
Platform,
1515
AccessibilityProps,
1616
ViewProps,
17+
ColorValue,
1718
} from 'react-native'
1819

1920
export type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center'
@@ -116,7 +117,7 @@ export interface FastImageProps extends AccessibilityProps, ViewProps {
116117
* If supplied, changes the color of all the non-transparent pixels to the given color.
117118
*/
118119

119-
tintColor?: number | string
120+
tintColor?: ColorValue
120121

121122
/**
122123
* A unique identifier for this element to be used in UI Automation testing scripts.
@@ -178,7 +179,7 @@ function FastImageBase({
178179
<View style={[styles.imageContainer, style]} ref={forwardedRef}>
179180
<Image
180181
{...props}
181-
style={[StyleSheet.absoluteFill, { tintColor: tintColor as any }]}
182+
style={[StyleSheet.absoluteFill, { tintColor }]}
182183
source={resolvedSource}
183184
defaultSource={defaultSource}
184185
onLoadStart={onLoadStart}

0 commit comments

Comments
 (0)