[ReactNative] Remove ImageSourcePropType

This commit is contained in:
Christopher Chedeau 2015-03-09 09:29:16 -07:00
parent 45da1f03cb
commit e4093a6abb
2 changed files with 8 additions and 29 deletions

View File

@ -10,7 +10,6 @@ var NativeMethodsMixin = require('NativeMethodsMixin');
var NativeModulesDeprecated = require('NativeModulesDeprecated'); var NativeModulesDeprecated = require('NativeModulesDeprecated');
var PropTypes = require('ReactPropTypes'); var PropTypes = require('ReactPropTypes');
var ImageResizeMode = require('ImageResizeMode'); var ImageResizeMode = require('ImageResizeMode');
var ImageSourcePropType = require('ImageSourcePropType');
var ImageStylePropTypes = require('ImageStylePropTypes'); var ImageStylePropTypes = require('ImageStylePropTypes');
var React = require('React'); var React = require('React');
var ReactIOSViewAttributes = require('ReactIOSViewAttributes'); var ReactIOSViewAttributes = require('ReactIOSViewAttributes');
@ -51,7 +50,14 @@ var warning = require('warning');
var Image = React.createClass({ var Image = React.createClass({
propTypes: { propTypes: {
source: ImageSourcePropType, source: PropTypes.shape({
/**
* A string representing the resource identifier for the image, which
* could be an http address, a local file path, or the name of a static image
* resource (which should be wrapped in the `ix` function).
*/
uri: PropTypes.string,
}).isRequired,
/** /**
* accessible - Whether this element should be revealed as an accessible * accessible - Whether this element should be revealed as an accessible
* element. * element.

View File

@ -1,27 +0,0 @@
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule ImageSourcePropType
* @flow
*/
'use strict';
var { PropTypes } = require('React');
var ImageSourcePropType = PropTypes.shape({
/**
* uri - A string representing the resource identifier for the image, which
* could be an http address, a local file path, or the name of a static image
* resource (which should be wrapped in the `ix` function).
*/
uri: PropTypes.string.isRequired,
/**
* width/height - Used to store the size of the image itself, but unused by
* the <Image> component - use normal style layout properties to define the
* size of the frame.
*/
width: PropTypes.number,
height: PropTypes.number,
});
module.exports = ImageSourcePropType;