const ActionBrowseTagline = require('./ActionBrowseTagline') const { localIcon } = require('./icons') const { h, Component } = require('preact') const poweredByUppy = (props) => { return Powered by Uppy } class AddFiles extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } handleClick (ev) { this.input.click() } render () { // const isHidden = Object.keys(this.props.files).length === 0 const hasAcquirers = this.props.acquirers.length !== 0 if (!hasAcquirers) { return (
{ this.props.note &&
{this.props.note}
} { this.props.proudlyDisplayPoweredByUppy && poweredByUppy(this.props) }
) } // empty value="" on file input, so that the input is cleared after a file is selected, // because Uppy will be handling the upload and so we can select same file // after removing — otherwise browser thinks it’s already selected return (
{this.props.acquirers.map((target) => { return })}
{ this.props.note &&
{this.props.note}
} { this.props.proudlyDisplayPoweredByUppy && poweredByUppy(this.props) }
) } } module.exports = AddFiles