chore(Image): Update image prop type to ImageSourcePropType

This commit is contained in:
BAYU KRESNO PRASETYO
2018-06-26 13:35:40 +07:00
parent f28a343a8d
commit d839311af3

View File

@@ -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
}; };