Skip to content

Commit

Permalink
fix: use ColorValue type (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann authored Oct 31, 2022
1 parent fbb6b68 commit 54376d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Platform,
AccessibilityProps,
ViewProps,
ColorValue,
} from 'react-native'

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

tintColor?: number | string
tintColor?: ColorValue

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

0 comments on commit 54376d8

Please sign in to comment.