mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix: add width, height and crossOrigin props on Image type declaration file (#36196)
Summary: According this Issue [`https://github.com/facebook/react-native/issues/36182`](https://github.com/facebook/react-native/issues/36182), the typescript compiler doesn't know the `width`, `height` and `crossOrigin` props for the `Image` component although they are taken in account in the code, [docs](https://reactnative.dev/docs/image#crossorigin) and the flow types. ## Changelog [GENERAL] [FIXED] - Fix missing `height`, `width`, `crossOrigin` props on Typescript Image.d.ts file Pull Request resolved: https://github.com/facebook/react-native/pull/36196 Reviewed By: christophpurrer Differential Revision: D43406094 Pulled By: rshest fbshipit-source-id: 547ed142d7c39c361d195275b79b0885ef829ba1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a4b41d2828
commit
bcf493f346
Vendored
+22
@@ -254,6 +254,28 @@ export interface ImagePropsBase
|
||||
* See https://reactnative.dev/docs/image#alt
|
||||
*/
|
||||
alt?: string | undefined;
|
||||
|
||||
/**
|
||||
* Height of the image component.
|
||||
*
|
||||
* See https://reactnative.dev/docs/image#height
|
||||
*/
|
||||
height?: number | undefined;
|
||||
|
||||
/**
|
||||
* Width of the image component.
|
||||
*
|
||||
* See https://reactnative.dev/docs/image#width
|
||||
*/
|
||||
width?: number | undefined;
|
||||
|
||||
/**
|
||||
* Adds the CORS related header to the request.
|
||||
* Similar to crossorigin from HTML.
|
||||
*
|
||||
* See https://reactnative.dev/docs/image#crossorigin
|
||||
*/
|
||||
crossOrigin?: 'anonymous' | 'use-credentials';
|
||||
}
|
||||
|
||||
export interface ImageProps extends ImagePropsBase {
|
||||
|
||||
Reference in New Issue
Block a user