mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Updates from Fri 20 Mar
- 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
This commit is contained in:
@@ -36,7 +36,7 @@ var warning = require('warning');
|
||||
* <View>
|
||||
* <Image
|
||||
* style={styles.icon}
|
||||
* source={ix('myIcon')}
|
||||
* source={require('image!myIcon')}
|
||||
* />
|
||||
* <Image
|
||||
* style={styles.logo}
|
||||
|
||||
@@ -9,23 +9,19 @@ var ImageResizeMode = require('ImageResizeMode');
|
||||
var LayoutPropTypes = require('LayoutPropTypes');
|
||||
var ReactPropTypes = require('ReactPropTypes');
|
||||
|
||||
var merge = require('merge');
|
||||
var ImageStylePropTypes = {
|
||||
...LayoutPropTypes,
|
||||
resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode)),
|
||||
backgroundColor: ReactPropTypes.string,
|
||||
borderColor: ReactPropTypes.string,
|
||||
borderWidth: ReactPropTypes.number,
|
||||
borderRadius: ReactPropTypes.number,
|
||||
|
||||
var ImageStylePropTypes = merge(
|
||||
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,
|
||||
}
|
||||
);
|
||||
// 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({
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule ix
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This function is used to mark string literals that are image paths. The
|
||||
* return value is a blob of data that core image components understand how to
|
||||
* render.
|
||||
*
|
||||
* The arguments to ix() must be string literals so that they can be parsed
|
||||
* statically.
|
||||
*
|
||||
* @param string Image path to render
|
||||
* @return object Data blob to be used by core UI components
|
||||
*/
|
||||
function ix(path) {
|
||||
return {
|
||||
uri: path,
|
||||
isStatic: true,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = ix;
|
||||
Reference in New Issue
Block a user