react-image-upload
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -24,3 +24,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var styles = {"content":"_2jwZj","imgWrapper":"_1Gs3W","btnWrapper":"_1gU9E","btn":"_1Pz2d"}; | ||
var styles = {"__content":"_2VJLH","__imgWrapper":"_FW764","__btnWrapper":"_354pS","__btn":"_3TA7V","__label":"_3ulBn","__input":"_1Zcq6","__img":"_196dV"}; | ||
@@ -30,3 +30,6 @@ var ImageUploader = function ImageUploader(_ref) { | ||
onFileRemoved = _ref.onFileRemoved, | ||
uploadElement = _ref.uploadElement; | ||
uploadElement = _ref.uploadElement, | ||
height = _ref.height, | ||
width = _ref.width, | ||
background = _ref.background; | ||
var ref = React.useRef(); | ||
@@ -59,9 +62,14 @@ | ||
return /*#__PURE__*/React__default.createElement("div", { | ||
className: styles.content | ||
className: styles.__content | ||
}, /*#__PURE__*/React__default.createElement("div", { | ||
className: styles.imgWrapper | ||
className: styles.__imgWrapper, | ||
style: { | ||
height: height, | ||
width: width, | ||
background: background | ||
} | ||
}, /*#__PURE__*/React__default.createElement("div", { | ||
className: styles.btnWrapper | ||
className: styles.__btnWrapper | ||
}, /*#__PURE__*/React__default.createElement("button", { | ||
className: styles.btn, | ||
className: styles.__btn, | ||
onClick: handleDeleteImage | ||
@@ -77,6 +85,6 @@ }, /*#__PURE__*/React__default.createElement("svg", { | ||
})))), /*#__PURE__*/React__default.createElement("label", { | ||
className: styles.label | ||
className: styles.__label | ||
}, /*#__PURE__*/React__default.createElement(UploadElement, { | ||
element: uploadElement | ||
}), currentImg.bataUrl ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement("input", { | ||
}), currentImg.dataUrl ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement("input", { | ||
key: currentImg, | ||
@@ -86,2 +94,3 @@ ref: ref, | ||
name: "upload", | ||
className: styles.__input, | ||
onChange: handleImageUpload, | ||
@@ -91,6 +100,5 @@ accept: "image/*", | ||
})), currentImg.dataUrl ? /*#__PURE__*/React__default.createElement("img", { | ||
className: styles.__img, | ||
src: currentImg === null || currentImg === void 0 ? void 0 : currentImg.dataUrl, | ||
alt: currentImg === null || currentImg === void 0 ? void 0 : currentImg.dataUrl, | ||
width: 200, | ||
height: 200, | ||
loading: "lazy" | ||
@@ -97,0 +105,0 @@ }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null))); |
@@ -21,3 +21,3 @@ import React, { useRef, useState } from 'react'; | ||
var styles = {"content":"_2jwZj","imgWrapper":"_1Gs3W","btnWrapper":"_1gU9E","btn":"_1Pz2d"}; | ||
var styles = {"__content":"_2VJLH","__imgWrapper":"_FW764","__btnWrapper":"_354pS","__btn":"_3TA7V","__label":"_3ulBn","__input":"_1Zcq6","__img":"_196dV"}; | ||
@@ -27,3 +27,6 @@ var ImageUploader = function ImageUploader(_ref) { | ||
onFileRemoved = _ref.onFileRemoved, | ||
uploadElement = _ref.uploadElement; | ||
uploadElement = _ref.uploadElement, | ||
height = _ref.height, | ||
width = _ref.width, | ||
background = _ref.background; | ||
var ref = useRef(); | ||
@@ -56,9 +59,14 @@ | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: styles.content | ||
className: styles.__content | ||
}, /*#__PURE__*/React.createElement("div", { | ||
className: styles.imgWrapper | ||
className: styles.__imgWrapper, | ||
style: { | ||
height: height, | ||
width: width, | ||
background: background | ||
} | ||
}, /*#__PURE__*/React.createElement("div", { | ||
className: styles.btnWrapper | ||
className: styles.__btnWrapper | ||
}, /*#__PURE__*/React.createElement("button", { | ||
className: styles.btn, | ||
className: styles.__btn, | ||
onClick: handleDeleteImage | ||
@@ -74,6 +82,6 @@ }, /*#__PURE__*/React.createElement("svg", { | ||
})))), /*#__PURE__*/React.createElement("label", { | ||
className: styles.label | ||
className: styles.__label | ||
}, /*#__PURE__*/React.createElement(UploadElement, { | ||
element: uploadElement | ||
}), currentImg.bataUrl ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement("input", { | ||
}), currentImg.dataUrl ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement("input", { | ||
key: currentImg, | ||
@@ -83,2 +91,3 @@ ref: ref, | ||
name: "upload", | ||
className: styles.__input, | ||
onChange: handleImageUpload, | ||
@@ -88,6 +97,5 @@ accept: "image/*", | ||
})), currentImg.dataUrl ? /*#__PURE__*/React.createElement("img", { | ||
className: styles.__img, | ||
src: currentImg === null || currentImg === void 0 ? void 0 : currentImg.dataUrl, | ||
alt: currentImg === null || currentImg === void 0 ? void 0 : currentImg.dataUrl, | ||
width: 200, | ||
height: 200, | ||
loading: "lazy" | ||
@@ -94,0 +102,0 @@ }) : /*#__PURE__*/React.createElement(React.Fragment, null))); |
{ | ||
"name": "react-image-upload", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "react library for uploading images", | ||
@@ -5,0 +5,0 @@ "author": "chimdie", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
27410
276