react-dropzone
Advanced tools
Comparing version 1.0.0 to 1.0.1
17
index.js
@@ -1,5 +0,1 @@ | ||
/** | ||
* @jsx React.DOM | ||
*/ | ||
var React = require('react'); | ||
@@ -50,2 +46,3 @@ | ||
if (this.props.onDrop) { | ||
files = Array.prototype.slice.call(files); | ||
this.props.onDrop(files); | ||
@@ -61,3 +58,3 @@ } | ||
var className = 'dropzone'; | ||
var className = this.props.className || 'dropzone'; | ||
if (this.state.isDragActive) { | ||
@@ -67,3 +64,3 @@ className += ' active'; | ||
var style = { | ||
var style = this.props.style || { | ||
width: this.props.size || 100, | ||
@@ -73,5 +70,9 @@ height: this.props.size || 100, | ||
}; | ||
if (this.props.className) { | ||
style = this.props.style; | ||
} | ||
return ( | ||
<div className={className} style={this.props.style || style} onClick={this.onClick} onDragLeave={this.onDragLeave} onDragOver={this.onDragOver} onDrop={this.onDrop}> | ||
<div className={className} style={style} onClick={this.onClick} onDragLeave={this.onDragLeave} onDragOver={this.onDragOver} onDrop={this.onDrop}> | ||
<input style={{display: 'none' }} type='file' multiple ref='fileInput' onChange={this.onDrop} /> | ||
@@ -78,0 +79,0 @@ {this.props.children} |
{ | ||
"name": "react-dropzone", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Simple HTML5 drag-drop zone in React", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16492
0
607300