react-image-upload
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -28,3 +28,4 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var onFileAdded = _ref.onFileAdded, | ||
onFileRemoved = _ref.onFileRemoved; | ||
onFileRemoved = _ref.onFileRemoved, | ||
uploadElement = _ref.uploadElement; | ||
var ref = React.useRef(); | ||
@@ -75,12 +76,5 @@ | ||
className: styles.label | ||
}, /*#__PURE__*/React__default.createElement("svg", { | ||
width: "50", | ||
height: "50", | ||
viewBox: "0 0 50 50", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, /*#__PURE__*/React__default.createElement("path", { | ||
d: "M8.33332 8.33332H14.5833L18.75 4.16666H31.25L35.4167 8.33332H41.6667C42.7717 8.33332 43.8315 8.77231 44.6129 9.55371C45.3943 10.3351 45.8333 11.3949 45.8333 12.5V37.5C45.8333 38.6051 45.3943 39.6649 44.6129 40.4463C43.8315 41.2277 42.7717 41.6666 41.6667 41.6666H8.33332C7.22825 41.6666 6.16845 41.2277 5.38704 40.4463C4.60564 39.6649 4.16666 38.6051 4.16666 37.5V12.5C4.16666 11.3949 4.60564 10.3351 5.38704 9.55371C6.16845 8.77231 7.22825 8.33332 8.33332 8.33332ZM25 14.5833C22.2373 14.5833 19.5878 15.6808 17.6343 17.6343C15.6808 19.5878 14.5833 22.2373 14.5833 25C14.5833 27.7627 15.6808 30.4122 17.6343 32.3657C19.5878 34.3192 22.2373 35.4167 25 35.4167C27.7627 35.4167 30.4122 34.3192 32.3657 32.3657C34.3192 30.4122 35.4167 27.7627 35.4167 25C35.4167 22.2373 34.3192 19.5878 32.3657 17.6343C30.4122 15.6808 27.7627 14.5833 25 14.5833ZM25 18.75C26.6576 18.75 28.2473 19.4085 29.4194 20.5806C30.5915 21.7527 31.25 23.3424 31.25 25C31.25 26.6576 30.5915 28.2473 29.4194 29.4194C28.2473 30.5915 26.6576 31.25 25 31.25C23.3424 31.25 21.7527 30.5915 20.5806 29.4194C19.4085 28.2473 18.75 26.6576 18.75 25C18.75 23.3424 19.4085 21.7527 20.5806 20.5806C21.7527 19.4085 23.3424 18.75 25 18.75Z", | ||
fill: "#848484" | ||
})), currentImg.bataUrl ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement("input", { | ||
}, /*#__PURE__*/React__default.createElement(UploadElement, { | ||
element: uploadElement | ||
}), currentImg.bataUrl ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement("input", { | ||
key: currentImg, | ||
@@ -102,3 +96,22 @@ ref: ref, | ||
function UploadElement(_ref2) { | ||
var element = _ref2.element; | ||
if (element) { | ||
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, element); | ||
} | ||
return /*#__PURE__*/React__default.createElement("svg", { | ||
width: "50", | ||
height: "50", | ||
viewBox: "0 0 50 50", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, /*#__PURE__*/React__default.createElement("path", { | ||
d: "M8.33332 8.33332H14.5833L18.75 4.16666H31.25L35.4167 8.33332H41.6667C42.7717 8.33332 43.8315 8.77231 44.6129 9.55371C45.3943 10.3351 45.8333 11.3949 45.8333 12.5V37.5C45.8333 38.6051 45.3943 39.6649 44.6129 40.4463C43.8315 41.2277 42.7717 41.6666 41.6667 41.6666H8.33332C7.22825 41.6666 6.16845 41.2277 5.38704 40.4463C4.60564 39.6649 4.16666 38.6051 4.16666 37.5V12.5C4.16666 11.3949 4.60564 10.3351 5.38704 9.55371C6.16845 8.77231 7.22825 8.33332 8.33332 8.33332ZM25 14.5833C22.2373 14.5833 19.5878 15.6808 17.6343 17.6343C15.6808 19.5878 14.5833 22.2373 14.5833 25C14.5833 27.7627 15.6808 30.4122 17.6343 32.3657C19.5878 34.3192 22.2373 35.4167 25 35.4167C27.7627 35.4167 30.4122 34.3192 32.3657 32.3657C34.3192 30.4122 35.4167 27.7627 35.4167 25C35.4167 22.2373 34.3192 19.5878 32.3657 17.6343C30.4122 15.6808 27.7627 14.5833 25 14.5833ZM25 18.75C26.6576 18.75 28.2473 19.4085 29.4194 20.5806C30.5915 21.7527 31.25 23.3424 31.25 25C31.25 26.6576 30.5915 28.2473 29.4194 29.4194C28.2473 30.5915 26.6576 31.25 25 31.25C23.3424 31.25 21.7527 30.5915 20.5806 29.4194C19.4085 28.2473 18.75 26.6576 18.75 25C18.75 23.3424 19.4085 21.7527 20.5806 20.5806C21.7527 19.4085 23.3424 18.75 25 18.75Z", | ||
fill: "#848484" | ||
})); | ||
} | ||
module.exports = ImageUploader; | ||
//# sourceMappingURL=index.js.map |
@@ -25,3 +25,4 @@ import React, { useRef, useState } from 'react'; | ||
var onFileAdded = _ref.onFileAdded, | ||
onFileRemoved = _ref.onFileRemoved; | ||
onFileRemoved = _ref.onFileRemoved, | ||
uploadElement = _ref.uploadElement; | ||
var ref = useRef(); | ||
@@ -72,12 +73,5 @@ | ||
className: styles.label | ||
}, /*#__PURE__*/React.createElement("svg", { | ||
width: "50", | ||
height: "50", | ||
viewBox: "0 0 50 50", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, /*#__PURE__*/React.createElement("path", { | ||
d: "M8.33332 8.33332H14.5833L18.75 4.16666H31.25L35.4167 8.33332H41.6667C42.7717 8.33332 43.8315 8.77231 44.6129 9.55371C45.3943 10.3351 45.8333 11.3949 45.8333 12.5V37.5C45.8333 38.6051 45.3943 39.6649 44.6129 40.4463C43.8315 41.2277 42.7717 41.6666 41.6667 41.6666H8.33332C7.22825 41.6666 6.16845 41.2277 5.38704 40.4463C4.60564 39.6649 4.16666 38.6051 4.16666 37.5V12.5C4.16666 11.3949 4.60564 10.3351 5.38704 9.55371C6.16845 8.77231 7.22825 8.33332 8.33332 8.33332ZM25 14.5833C22.2373 14.5833 19.5878 15.6808 17.6343 17.6343C15.6808 19.5878 14.5833 22.2373 14.5833 25C14.5833 27.7627 15.6808 30.4122 17.6343 32.3657C19.5878 34.3192 22.2373 35.4167 25 35.4167C27.7627 35.4167 30.4122 34.3192 32.3657 32.3657C34.3192 30.4122 35.4167 27.7627 35.4167 25C35.4167 22.2373 34.3192 19.5878 32.3657 17.6343C30.4122 15.6808 27.7627 14.5833 25 14.5833ZM25 18.75C26.6576 18.75 28.2473 19.4085 29.4194 20.5806C30.5915 21.7527 31.25 23.3424 31.25 25C31.25 26.6576 30.5915 28.2473 29.4194 29.4194C28.2473 30.5915 26.6576 31.25 25 31.25C23.3424 31.25 21.7527 30.5915 20.5806 29.4194C19.4085 28.2473 18.75 26.6576 18.75 25C18.75 23.3424 19.4085 21.7527 20.5806 20.5806C21.7527 19.4085 23.3424 18.75 25 18.75Z", | ||
fill: "#848484" | ||
})), currentImg.bataUrl ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement("input", { | ||
}, /*#__PURE__*/React.createElement(UploadElement, { | ||
element: uploadElement | ||
}), currentImg.bataUrl ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement("input", { | ||
key: currentImg, | ||
@@ -99,3 +93,22 @@ ref: ref, | ||
function UploadElement(_ref2) { | ||
var element = _ref2.element; | ||
if (element) { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, element); | ||
} | ||
return /*#__PURE__*/React.createElement("svg", { | ||
width: "50", | ||
height: "50", | ||
viewBox: "0 0 50 50", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, /*#__PURE__*/React.createElement("path", { | ||
d: "M8.33332 8.33332H14.5833L18.75 4.16666H31.25L35.4167 8.33332H41.6667C42.7717 8.33332 43.8315 8.77231 44.6129 9.55371C45.3943 10.3351 45.8333 11.3949 45.8333 12.5V37.5C45.8333 38.6051 45.3943 39.6649 44.6129 40.4463C43.8315 41.2277 42.7717 41.6666 41.6667 41.6666H8.33332C7.22825 41.6666 6.16845 41.2277 5.38704 40.4463C4.60564 39.6649 4.16666 38.6051 4.16666 37.5V12.5C4.16666 11.3949 4.60564 10.3351 5.38704 9.55371C6.16845 8.77231 7.22825 8.33332 8.33332 8.33332ZM25 14.5833C22.2373 14.5833 19.5878 15.6808 17.6343 17.6343C15.6808 19.5878 14.5833 22.2373 14.5833 25C14.5833 27.7627 15.6808 30.4122 17.6343 32.3657C19.5878 34.3192 22.2373 35.4167 25 35.4167C27.7627 35.4167 30.4122 34.3192 32.3657 32.3657C34.3192 30.4122 35.4167 27.7627 35.4167 25C35.4167 22.2373 34.3192 19.5878 32.3657 17.6343C30.4122 15.6808 27.7627 14.5833 25 14.5833ZM25 18.75C26.6576 18.75 28.2473 19.4085 29.4194 20.5806C30.5915 21.7527 31.25 23.3424 31.25 25C31.25 26.6576 30.5915 28.2473 29.4194 29.4194C28.2473 30.5915 26.6576 31.25 25 31.25C23.3424 31.25 21.7527 30.5915 20.5806 29.4194C19.4085 28.2473 18.75 26.6576 18.75 25C18.75 23.3424 19.4085 21.7527 20.5806 20.5806C21.7527 19.4085 23.3424 18.75 25 18.75Z", | ||
fill: "#848484" | ||
})); | ||
} | ||
export default ImageUploader; | ||
//# sourceMappingURL=index.modern.js.map |
{ | ||
"name": "react-image-upload", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"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
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
25929
261