Bug fixing added moving torrents after download, getting ready for alpha release
This commit is contained in:
		
							
								
								
									
										80
									
								
								goTorrentWebUI/node_modules/react-dropzone/examples/Basic/Readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								goTorrentWebUI/node_modules/react-dropzone/examples/Basic/Readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,80 @@
 | 
			
		||||
Dropzone with default properties and displays list of the dropped files.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
class Basic extends React.Component {
 | 
			
		||||
  constructor() {
 | 
			
		||||
    super()
 | 
			
		||||
    this.state = { files: [] }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  onDrop(files) {
 | 
			
		||||
    this.setState({
 | 
			
		||||
      files
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    return (
 | 
			
		||||
      <section>
 | 
			
		||||
        <div className="dropzone">
 | 
			
		||||
          <Dropzone onDrop={this.onDrop.bind(this)}>
 | 
			
		||||
            <p>Try dropping some files here, or click to select files to upload.</p>
 | 
			
		||||
          </Dropzone>
 | 
			
		||||
        </div>
 | 
			
		||||
        <aside>
 | 
			
		||||
          <h2>Dropped files</h2>
 | 
			
		||||
          <ul>
 | 
			
		||||
            {
 | 
			
		||||
              this.state.files.map(f => <li key={f.name}>{f.name} - {f.size} bytes</li>)
 | 
			
		||||
            }
 | 
			
		||||
          </ul>
 | 
			
		||||
        </aside>
 | 
			
		||||
      </section>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<Basic />
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Dropzone with `disabled` property:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
class Basic extends React.Component {
 | 
			
		||||
  constructor() {
 | 
			
		||||
    super()
 | 
			
		||||
    this.state = { disabled: true, files: [] }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  onDrop(files) {
 | 
			
		||||
    this.setState({
 | 
			
		||||
      files
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    return (
 | 
			
		||||
      <section>
 | 
			
		||||
        <aside>
 | 
			
		||||
          <button type="button" onClick={() => this.setState({ disabled: !this.state.disabled })}>Toggle disabled</button>
 | 
			
		||||
        </aside>
 | 
			
		||||
        <div className="dropzone">
 | 
			
		||||
          <Dropzone onDrop={this.onDrop.bind(this)} disabled={this.state.disabled}>
 | 
			
		||||
            <p>Try dropping some files here, or click to select files to upload.</p>
 | 
			
		||||
          </Dropzone>
 | 
			
		||||
        </div>
 | 
			
		||||
        <aside>
 | 
			
		||||
          <h2>Dropped files</h2>
 | 
			
		||||
          <ul>
 | 
			
		||||
            {
 | 
			
		||||
              this.state.files.map(f => <li>{f.name} - {f.size} bytes</li>)
 | 
			
		||||
            }
 | 
			
		||||
          </ul>
 | 
			
		||||
        </aside>
 | 
			
		||||
      </section>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<Basic />
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user