mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
a66fad52b6
- declare timeoutID | Basil Hosmer - [react-packager] Allow entry point extensions like .ios.js | Amjad Masad - [react-native] Use SpreadProperty to make react-docgen happy | Felix Kling - clean Examples/2048 | Basil Hosmer - [ReactNative] Adjust packager default root when running from within node_modules | Alex Kotliarskyi - [ReactNative] Add missing websocket dependency | Alex Kotliarskyi - [react-packager] change all but one `ix` to `require` | Amjad Masad
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
*
|
|
* @providesModule ImageStylePropTypes
|
|
*/
|
|
'use strict';
|
|
|
|
var ImageResizeMode = require('ImageResizeMode');
|
|
var LayoutPropTypes = require('LayoutPropTypes');
|
|
var ReactPropTypes = require('ReactPropTypes');
|
|
|
|
var ImageStylePropTypes = {
|
|
...LayoutPropTypes,
|
|
resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode)),
|
|
backgroundColor: ReactPropTypes.string,
|
|
borderColor: ReactPropTypes.string,
|
|
borderWidth: ReactPropTypes.number,
|
|
borderRadius: ReactPropTypes.number,
|
|
|
|
// iOS-Specific style to "tint" an image.
|
|
// It changes the color of all the non-transparent pixels to the tintColor
|
|
tintColor: ReactPropTypes.string,
|
|
opacity: ReactPropTypes.number,
|
|
};
|
|
|
|
// Image doesn't support padding correctly (#4841912)
|
|
var unsupportedProps = Object.keys({
|
|
padding: null,
|
|
paddingTop: null,
|
|
paddingLeft: null,
|
|
paddingRight: null,
|
|
paddingBottom: null,
|
|
paddingVertical: null,
|
|
paddingHorizontal: null,
|
|
});
|
|
|
|
for (var key in unsupportedProps) {
|
|
delete ImageStylePropTypes[key];
|
|
}
|
|
|
|
module.exports = ImageStylePropTypes;
|