Accept xlinkHref as fallback to href, Fixes #500

This commit is contained in:
Mikael Sand
2019-01-23 19:04:01 +02:00
parent a620d31d6d
commit bc14b90773
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -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 (
<RNSVGImage
+2 -1
View File
@@ -25,7 +25,8 @@ export default class TextPath extends Shape {
render() {
const {
children,
href,
xlinkHref,
href = xlinkHref,
startOffset,
method,
spacing,
+1 -1
View File
@@ -16,7 +16,7 @@ export default class Use extends Shape {
render() {
const { props } = this;
const { children, x, y, width, height, href } = props;
const { children, x, y, width, height, xlinkHref, href = xlinkHref } = props;
// match "url(#pattern)"
const matched = href.match(idPattern);
Vendored
+3
View File
@@ -192,6 +192,7 @@ export interface ImageProps extends ResponderProps, TouchableProps {
y?: NumberProp,
width?: NumberProp,
height?: NumberProp,
xlinkHref?: ReactNative.ImageProperties['source'],
href: ReactNative.ImageProperties['source'],
preserveAspectRatio?: string,
opacity?: NumberProp,
@@ -324,6 +325,7 @@ export interface TextProps extends TextSpecificProps {
export const Text: React.ComponentClass<TextProps>;
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<TextPathProps>;
export interface UseProps extends CommonPathProps {
xlinkHref?: string,
href: string,
width?: string,
height?: string,