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:
Christopher Chedeau
2015-03-21 10:07:45 -07:00
parent 17d5182b6c
commit a66fad52b6
17 changed files with 97 additions and 111 deletions

View File

@@ -36,7 +36,7 @@ var warning = require('warning');
* <View>
* <Image
* style={styles.icon}
* source={ix('myIcon')}
* source={require('image!myIcon')}
* />
* <Image
* style={styles.logo}

View File

@@ -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({

View File

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