rax-image
Advanced tools
Comparing version 2.2.2-0 to 2.2.2-1
@@ -1,4 +0,4 @@ | ||
/// <reference types="rax" /> | ||
import { ForwardRefExoticComponent } from 'rax'; | ||
import { ImageProps } from './types'; | ||
declare function Image({ source, fallbackSource, onLoad, onError, style, resizeMode, ...otherProps }: ImageProps): JSX.Element; | ||
declare const Image: ForwardRefExoticComponent<ImageProps>; | ||
export default Image; |
@@ -26,4 +26,3 @@ "use strict"; | ||
var EMPTY_SOURCE = {}; | ||
function Image(_a) { | ||
var Image = (0, _rax.forwardRef)(function (_a, ref) { | ||
var source = _a.source, | ||
@@ -58,3 +57,3 @@ fallbackSource = _a.fallbackSource, | ||
onLoad && onLoad(e); | ||
} else if (e && e.currentTarget && e.currentTarget.naturalWidth > 0 && e.currentTarget.naturalHeight > 0) { | ||
} else if (e && e.currentTarget && e.currentTarget.naturalWidth > 1 && e.currentTarget.naturalHeight > 1) { | ||
// web | ||
@@ -99,6 +98,9 @@ onLoad && onLoad(e); | ||
quality: "original" | ||
}, nativeProps)) : (0, _rax.createElement)("img", nativeProps); | ||
} | ||
}, nativeProps, { | ||
ref: ref | ||
})) : (0, _rax.createElement)("img", _extends({}, nativeProps, { | ||
ref: ref | ||
})); | ||
}); | ||
var _default = Image; | ||
exports.default = _default; |
{ | ||
"name": "rax-image", | ||
"version": "2.2.2-0", | ||
"version": "2.2.2-1", | ||
"description": "Image component for Rax.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
54270
987
0
4