2018-10-02 23:42:28 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
* @flow
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2019-05-08 18:44:25 +03:00
|
|
|
const DeprecatedEdgeInsetsPropType = require('./DeprecatedEdgeInsetsPropType');
|
|
|
|
const DeprecatedImageSourcePropType = require('./DeprecatedImageSourcePropType');
|
|
|
|
const DeprecatedImageStylePropTypes = require('./DeprecatedImageStylePropTypes');
|
|
|
|
const DeprecatedStyleSheetPropType = require('./DeprecatedStyleSheetPropType');
|
2018-10-02 23:42:28 +03:00
|
|
|
const PropTypes = require('prop-types');
|
|
|
|
|
|
|
|
module.exports = {
|
2019-08-09 20:06:53 +03:00
|
|
|
style: (DeprecatedStyleSheetPropType(
|
|
|
|
DeprecatedImageStylePropTypes,
|
|
|
|
): ReactPropsCheckType),
|
2018-10-02 23:42:28 +03:00
|
|
|
source: DeprecatedImageSourcePropType,
|
2019-08-09 20:06:53 +03:00
|
|
|
defaultSource: (PropTypes.oneOfType([
|
2018-10-02 23:42:28 +03:00
|
|
|
PropTypes.shape({
|
|
|
|
uri: PropTypes.string,
|
|
|
|
width: PropTypes.number,
|
|
|
|
height: PropTypes.number,
|
|
|
|
scale: PropTypes.number,
|
|
|
|
}),
|
|
|
|
PropTypes.number,
|
2019-08-09 20:06:53 +03:00
|
|
|
]): React$PropType$Primitive<
|
|
|
|
{height?: number, scale?: number, uri?: string, width?: number} | number,
|
|
|
|
>),
|
2018-10-02 23:42:28 +03:00
|
|
|
|
|
|
|
accessible: PropTypes.bool,
|
|
|
|
|
|
|
|
accessibilityLabel: PropTypes.node,
|
|
|
|
|
|
|
|
blurRadius: PropTypes.number,
|
|
|
|
|
|
|
|
capInsets: DeprecatedEdgeInsetsPropType,
|
|
|
|
|
2019-08-09 20:06:53 +03:00
|
|
|
resizeMethod: (PropTypes.oneOf([
|
|
|
|
'auto',
|
|
|
|
'resize',
|
|
|
|
'scale',
|
|
|
|
]): React$PropType$Primitive<'auto' | 'resize' | 'scale'>),
|
2018-10-02 23:42:28 +03:00
|
|
|
|
2019-08-09 20:06:53 +03:00
|
|
|
resizeMode: (PropTypes.oneOf([
|
2018-10-02 23:42:28 +03:00
|
|
|
'cover',
|
|
|
|
'contain',
|
|
|
|
'stretch',
|
|
|
|
'repeat',
|
|
|
|
'center',
|
2019-08-09 20:06:53 +03:00
|
|
|
]): React$PropType$Primitive<
|
|
|
|
'cover' | 'contain' | 'stretch' | 'repeat' | 'center',
|
|
|
|
>),
|
2018-10-02 23:42:28 +03:00
|
|
|
|
|
|
|
testID: PropTypes.string,
|
|
|
|
|
|
|
|
onLayout: PropTypes.func,
|
|
|
|
|
|
|
|
onLoadStart: PropTypes.func,
|
|
|
|
|
|
|
|
onProgress: PropTypes.func,
|
|
|
|
|
|
|
|
onError: PropTypes.func,
|
|
|
|
|
|
|
|
onPartialLoad: PropTypes.func,
|
|
|
|
|
|
|
|
onLoad: PropTypes.func,
|
|
|
|
|
|
|
|
onLoadEnd: PropTypes.func,
|
|
|
|
};
|