Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use ColorValue type #939

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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