rax-image
Advanced tools
Comparing version 1.0.4-beta.4 to 1.1.0-beta.1
@@ -0,3 +1,4 @@ | ||
import { ForwardRefExoticComponent } from 'rax'; | ||
import { ImageProps } from './types'; | ||
declare const Image: import("@rax-types/rax").ForwardRefExoticComponent<Pick<ImageProps, string | number> & import("@rax-types/rax").RefAttributes<HTMLDivElement>>; | ||
declare const Image: ForwardRefExoticComponent<ImageProps>; | ||
export default Image; |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _dedupe = _interopRequireDefault(require("classnames/dedupe")); | ||
@@ -83,12 +83,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
if (source && source.uri) { | ||
var style = nativeProps.style; | ||
var _nativeProps$style = nativeProps.style, | ||
style = _nativeProps$style === void 0 ? {} : _nativeProps$style; | ||
var width = source.width, | ||
height = source.height, | ||
uri = source.uri; // Default is 0 | ||
if (!width && !height && !style.height && !style.width) { | ||
width = 0; | ||
height = 0; | ||
} | ||
uri = source.uri; | ||
nativeProps.style = Object.assign({ | ||
@@ -119,3 +114,3 @@ width: width, | ||
var cls = (0, _classnames.default)('rax-image', className); | ||
var cls = (0, _dedupe.default)('rax-image', className); | ||
return _universalEnv.isWeex ? (0, _rax.createElement)("image", _extends({ | ||
@@ -122,0 +117,0 @@ ref: imgRef, |
{ | ||
"name": "rax-image", | ||
"version": "1.0.4-beta.4", | ||
"version": "1.1.0-beta.1", | ||
"description": "Image component for Rax.", | ||
@@ -9,3 +9,3 @@ "license": "BSD-3-Clause", | ||
"scripts": { | ||
"clean": "rm -rf ./lib && rm -rf ./package-lock.json", | ||
"clean": "rm -rf ./lib ./package-lock.json ./demo/miniapp/lib ", | ||
"build": "npm run clean && rax-scripts build", | ||
@@ -56,6 +56,7 @@ "start": "rax-scripts start", | ||
"rax": "^1.0.0", | ||
"rax-plugin-component": "^0.1.9-1", | ||
"rax-plugin-component": "^0.1.9", | ||
"rax-scripts": "^2.0.0", | ||
"rax-test-renderer": "^1.0.0", | ||
"rax-text": "^1.0.1" | ||
"rax-text": "^1.0.1", | ||
"typescript": "^3.6.2" | ||
}, | ||
@@ -65,2 +66,2 @@ "miniappConfig": { | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21588
16
542