Skip to content
Closed
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
39 changes: 38 additions & 1 deletion Libraries/Image/Image.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {Constructor} from '../../types/private/Utilities';
import {AccessibilityProps} from '../Components/View/ViewAccessibility';
import {Insets} from '../../types/public/Insets';
import {NativeMethods} from '../../types/public/ReactNativeTypes';
import {StyleProp} from '../StyleSheet/StyleSheet';
import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet';
import {ImageStyle, ViewStyle} from '../StyleSheet/StyleSheetTypes';
import {LayoutChangeEvent, NativeSyntheticEvent} from '../Types/CoreEventTypes';
import {ImageResizeMode} from './ImageResizeMode';
Expand Down Expand Up @@ -225,6 +225,21 @@ export interface ImagePropsBase
*/
source: ImageSourcePropType;

/**
* A string representing the resource identifier for the image. Similar to
* src from HTML.
*
* See https://reactnative.dev/docs/image#src
*/
src?: string | undefined,

/**
* Similar to srcset from HTML.
*
* See https://reactnative.dev/docs/image#srcset
*/
srcSet?: string | undefined,

/**
* similarly to `source`, this property represents the resource used to render
* the loading indicator for the image, displayed until image is ready to be
Expand Down Expand Up @@ -276,6 +291,28 @@ export interface ImagePropsBase
* See https://reactnative.dev/docs/image#crossorigin
*/
crossOrigin?: 'anonymous' | 'use-credentials';

/**
* Changes the color of all the non-transparent pixels to the tintColor.
*
* See https://reactnative.dev/docs/image#tintcolor
*/
tintColor?: ColorValue | undefined,

/**
* A string indicating which referrer to use when fetching the resource.
* Similar to referrerpolicy from HTML.
*
* See https://reactnative.dev/docs/image#referrerpolicy
*/
referrerPolicy?: 'no-referrer'
| 'no-referrer-when-downgrade'
| 'origin'
| 'origin-when-cross-origin'
| 'same-origin' | 'strict-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url'
| undefined,
}

export interface ImageProps extends ImagePropsBase {
Expand Down