From 7842fff1b235af695a67386396a69951d1a42c2c Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Wed, 16 Aug 2017 16:54:50 -0400 Subject: [PATCH] [rn] Adds imageStyle prop to ImageBackground --- types/react-native/index.d.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 848f4f4d2d..6a434c159d 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3430,6 +3430,23 @@ export interface ImageStatic extends NativeMethodsMixin, React.ComponentClass> } +export interface ImageBackgroundProperties extends ImageProperties { + style?: StyleProp + imageStyle?: StyleProp +} + +export interface ImageBackgroundStatic extends NativeMethodsMixin, React.ComponentClass { + resizeMode: ImageResizeMode + getSize( + uri: string, + success: (width: number, height: number) => void, + failure: (error: any) => void + ): any + prefetch(url: string): any + abortPrefetch?(requestId: number): void + queryCache?(urls: string[]): Promise> +} + export interface ViewToken { item: any; key: string; @@ -8851,8 +8868,8 @@ export type DrawerLayoutAndroid = DrawerLayoutAndroidStatic export var Image: ImageStatic export type Image = ImageStatic -export var ImageBackground: ImageStatic -export type ImageBackground = ImageStatic +export var ImageBackground: ImageBackgroundStatic +export type ImageBackground = ImageBackgroundStatic export var ImagePickerIOS: ImagePickerIOSStatic export type ImagePickerIOS = ImagePickerIOSStatic