mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 06:15:15 +00:00
chore(Image): Update image prop type to ImageSourcePropType
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Image } from "react-native";
|
import { Image, requireNativeComponent } from "react-native";
|
||||||
import { requireNativeComponent } from "react-native";
|
import ImageSourcePropType from 'react-native/Libraries/Image/ImageSourcePropType';
|
||||||
import { ImageAttributes } from "../lib/attributes";
|
import { ImageAttributes } from "../lib/attributes";
|
||||||
import { numberProp, touchableProps, responderProps } from "../lib/props";
|
import { numberProp, touchableProps, responderProps } from "../lib/props";
|
||||||
import Shape from "./Shape";
|
import Shape from "./Shape";
|
||||||
@@ -19,7 +19,7 @@ export default class extends Shape {
|
|||||||
y: numberProp,
|
y: numberProp,
|
||||||
width: numberProp.isRequired,
|
width: numberProp.isRequired,
|
||||||
height: numberProp.isRequired,
|
height: numberProp.isRequired,
|
||||||
href: Image.propTypes.source,
|
href: ImageSourcePropType,
|
||||||
preserveAspectRatio: PropTypes.string
|
preserveAspectRatio: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user