react-dropzone
Advanced tools
Comparing version 11.5.0 to 11.5.1
@@ -63,3 +63,3 @@ Starting with version 7.0.0, the `{preview}` property generation on the [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects and the `{disablePreview}` property on the `<Dropzone>` have been removed. | ||
useEffect(() => () => { | ||
useEffect(() => { | ||
// Make sure to revoke the data uris to avoid memory leaks | ||
@@ -66,0 +66,0 @@ files.forEach(file => URL.revokeObjectURL(file.preview)); |
@@ -25,3 +25,3 @@ The hook fn doesn't set any styles on either of the prop fns (`getRootProps()`/`getInputProps()`). | ||
const activeStyle = { | ||
const focusedStyle = { | ||
borderColor: '#2196f3' | ||
@@ -42,3 +42,3 @@ }; | ||
getInputProps, | ||
isDragActive, | ||
isFocused, | ||
isDragAccept, | ||
@@ -50,9 +50,9 @@ isDragReject | ||
...baseStyle, | ||
...(isDragActive ? activeStyle : {}), | ||
...(isFocused ? focusedStyle : {}), | ||
...(isDragAccept ? acceptStyle : {}), | ||
...(isDragReject ? rejectStyle : {}) | ||
}), [ | ||
isDragActive, | ||
isDragReject, | ||
isDragAccept | ||
isFocused, | ||
isDragAccept, | ||
isDragReject | ||
]); | ||
@@ -87,3 +87,3 @@ | ||
} | ||
if (props.isDragActive) { | ||
if (props.isFocused) { | ||
return '#2196f3'; | ||
@@ -114,3 +114,3 @@ } | ||
getInputProps, | ||
isDragActive, | ||
isFocused, | ||
isDragAccept, | ||
@@ -122,3 +122,3 @@ isDragReject | ||
<div className="container"> | ||
<Container {...getRootProps({isDragActive, isDragAccept, isDragReject})}> | ||
<Container {...getRootProps({isFocused, isDragAccept, isDragReject})}> | ||
<input {...getInputProps()} /> | ||
@@ -125,0 +125,0 @@ <p>Drag 'n' drop some files here, or click to select files</p> |
@@ -6,2 +6,3 @@ { | ||
"module": "dist/es/index.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
@@ -170,3 +171,3 @@ "ci": "git-cz", | ||
}, | ||
"version": "11.5.0", | ||
"version": "11.5.1", | ||
"engines": { | ||
@@ -173,0 +174,0 @@ "node": ">= 10" |
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
354665