diff --git a/Example/src/examples/Image.tsx b/Example/src/examples/Image.tsx index 6af4a70e..27f7b701 100644 --- a/Example/src/examples/Image.tsx +++ b/Example/src/examples/Image.tsx @@ -82,7 +82,6 @@ class DataURI extends Component { y="5%" width="90%" height="90%" - // @ts-expect-error href={Platform.OS === 'web' ? dataUriExample : {uri: dataUriExample}} opacity="0.6" /> diff --git a/FabricExample/src/examples/Image.tsx b/FabricExample/src/examples/Image.tsx index d0b8c6f3..8ded8cd1 100644 --- a/FabricExample/src/examples/Image.tsx +++ b/FabricExample/src/examples/Image.tsx @@ -82,7 +82,6 @@ class DataURI extends Component { y="5%" width="90%" height="90%" - // @ts-expect-error href={Platform.OS === 'web' ? dataUriExample : {uri: dataUriExample}} opacity="0.6" /> diff --git a/src/elements/Image.tsx b/src/elements/Image.tsx index bb1b1994..d5cece10 100644 --- a/src/elements/Image.tsx +++ b/src/elements/Image.tsx @@ -28,8 +28,8 @@ export interface ImageProps y?: NumberProp; width?: NumberProp; height?: NumberProp; - xlinkHref?: RNImageProps['source']; - href?: RNImageProps['source']; + xlinkHref?: RNImageProps['source'] | string; + href?: RNImageProps['source'] | string; preserveAspectRatio?: string; opacity?: NumberProp; clipPath?: string; diff --git a/src/index.js.flow b/src/index.js.flow index 0550ba5b..76eead2c 100644 --- a/src/index.js.flow +++ b/src/index.js.flow @@ -252,8 +252,8 @@ export type ImageProps = { y?: NumberProp, width?: NumberProp, height?: NumberProp, - xlinkHref?: $PropertyType, - href?: $PropertyType, + xlinkHref?: $PropertyType | string, + href?: $PropertyType | string, preserveAspectRatio?: string, opacity?: NumberProp, clipPath?: string,