From bc14b907732946a5cdd210110cc7fbf7b682f985 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Wed, 23 Jan 2019 19:04:01 +0200 Subject: [PATCH] Accept xlinkHref as fallback to href, Fixes #500 --- elements/Image.js | 2 +- elements/TextPath.js | 3 ++- elements/Use.js | 2 +- index.d.ts | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/elements/Image.js b/elements/Image.js index a90aa958..01c67d2c 100644 --- a/elements/Image.js +++ b/elements/Image.js @@ -19,7 +19,7 @@ export default class SvgImage extends Shape { render() { const { props } = this; - const { preserveAspectRatio, x, y, width, height, href } = props; + const { preserveAspectRatio, x, y, width, height, xlinkHref, href = xlinkHref } = props; const modes = preserveAspectRatio.trim().split(spacesRegExp); return ( ; export interface TextPathProps extends TextSpecificProps { + xlinkHref?: string, href: string, startOffset?: NumberProp, method?: TextPathMethod, @@ -333,6 +335,7 @@ export interface TextPathProps extends TextSpecificProps { export const TextPath: React.ComponentClass; export interface UseProps extends CommonPathProps { + xlinkHref?: string, href: string, width?: string, height?: string,