From baf011fbf1fd56bf8e0ad655de67ef53b50fe7c5 Mon Sep 17 00:00:00 2001 From: Umesh Patidar <95164894+andev240@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:53:16 +0530 Subject: [PATCH] fix: make image props extend CommonPathProps (#2007) Since `Image` can use all the props provided by `CommonPathProps` type, we extend it with adding image-specific props. Co-authored-by: Umesh Dangrecha Co-authored-by: Wojciech Lewicki --- src/elements/Image.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/elements/Image.tsx b/src/elements/Image.tsx index 9d773bdd..b8bc6132 100644 --- a/src/elements/Image.tsx +++ b/src/elements/Image.tsx @@ -6,25 +6,13 @@ import { stringifyPropsForFabric, withoutXY, } from '../lib/extract/extractProps'; -import type { - ClipProps, - CommonMaskProps, - NativeProps, - NumberProp, - ResponderProps, - TouchableProps, -} from '../lib/extract/types'; +import type { CommonPathProps, NumberProp } from '../lib/extract/types'; import Shape from './Shape'; import RNSVGImage from '../fabric/ImageNativeComponent'; const spacesRegExp = /\s+/; -export interface ImageProps - extends ResponderProps, - CommonMaskProps, - ClipProps, - TouchableProps, - NativeProps { +export interface ImageProps extends CommonPathProps { x?: NumberProp; y?: NumberProp; width?: NumberProp; @@ -33,8 +21,6 @@ export interface ImageProps href?: RNImageProps['source'] | string; preserveAspectRatio?: string; opacity?: NumberProp; - clipPath?: string; - id?: string; } export default class SvgImage extends Shape {