react-dropzone
Advanced tools
Comparing version 8.0.3 to 8.0.4
@@ -85,2 +85,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
if (evt.dataTransfer) { | ||
evt.dataTransfer.dropEffect = 'copy'; | ||
} | ||
if (_this.props.onDragOver && isDragDataWithFiles(evt)) { | ||
@@ -87,0 +91,0 @@ _this.props.onDragOver.call(_this, evt); |
@@ -33,5 +33,5 @@ By default, the Dropzone component doesn't render any styles. | ||
styles = isDragReject ? {...styles, ...rejectStyle} : styles | ||
return ( | ||
<div | ||
<div | ||
{...getRootProps()} | ||
@@ -60,5 +60,5 @@ style={styles} | ||
} | ||
if (props.isDragActive) { | ||
if (props.isDragActive) { | ||
return '#6c6'; | ||
} | ||
} | ||
return '#666'; | ||
@@ -78,3 +78,3 @@ }; | ||
<Dropzone accept="image/*"> | ||
{({ getRootProps, isDragActive, isDragAccept, isDragReject, acceptedFiles }) => { | ||
{({ getRootProps, getInputProps, isDragActive, isDragAccept, isDragReject, acceptedFiles }) => { | ||
return ( | ||
@@ -86,2 +86,3 @@ <Container | ||
> | ||
<input {...getInputProps()} /> | ||
{isDragAccept ? 'Drop' : 'Drag'} files here... | ||
@@ -88,0 +89,0 @@ </Container> |
@@ -151,3 +151,3 @@ { | ||
}, | ||
"version": "8.0.3", | ||
"version": "8.0.4", | ||
"engines": { | ||
@@ -154,0 +154,0 @@ "node": ">= 6" |
@@ -16,8 +16,2 @@ ![react-dropzone logo](https://raw.githubusercontent.com/react-dropzone/react-dropzone/master/logo/logo.png) | ||
--- | ||
**Looking for maintainers: https://github.com/react-dropzone/react-dropzone/issues/479** | ||
--- | ||
## Installation | ||
@@ -24,0 +18,0 @@ |
@@ -98,2 +98,6 @@ /* eslint prefer-template: 0 */ | ||
if (evt.dataTransfer) { | ||
evt.dataTransfer.dropEffect = 'copy' | ||
} | ||
if (this.props.onDragOver && isDragDataWithFiles(evt)) { | ||
@@ -100,0 +104,0 @@ this.props.onDragOver.call(this, evt) |
Sorry, the diff of this file is too big to display
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
247468
4063
240