How to use the react-dropzone.propTypes function in react-dropzone

To help you get started, we’ve selected a few react-dropzone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kleros / tokens-on-trial / src / components / file-picker / index.js View on Github external
) : (
      <div>
        {' '}
        {file.name}
      </div>
    )}
  
)

FilePicker.propTypes = {
  // React Dropzone
  ...Dropzone.propTypes,

  // State
  message: PropTypes.node
}

FilePicker.defaultProps = {
  // State
  message: 'Drag file or click here'
}

export default FilePicker
github kleros / doges-on-trial / src / components / file-picker / index.js View on Github external
<small>{message}</small>
    <button size="small" type="ternary">
      {buttonMessage}
    </button>
    {imageFilePreviewURL &amp;&amp; (
      <div style="{{">
    )}
  
)

FilePicker.propTypes = {
  // React Dropzone
  ...Dropzone.propTypes,

  // State
  message: PropTypes.node,
  buttonMessage: PropTypes.node,
  imageFilePreviewURL: PropTypes.string
}

FilePicker.defaultProps = {
  // State
  message: 'Drag file here or',
  buttonMessage: 'Browse Image',
  imageFilePreviewURL: null
}

export default FilePicker
</div>

react-dropzone

Simple HTML5 drag-drop zone with React.js

MIT
Latest version published 4 days ago

Package Health Score

97 / 100
Full package analysis