mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-21 09:18:45 +00:00
* Allowed HTML Attributes to be passed via props This fix still needs some work, as certain attributes could be passed to Uppy or as an HTML attribute, such as target When this is fixed, this will resolve #2403 * Removed shared attributes I removed the ability to use certain attributes ('width', 'height', and 'target') and pass them down as Props to the div due to that fact that Uppy relies on them * Add typescript types for the HTML attributes * Moved common.js to getHTMLProps.js * Fixed import * Converted `possibleStandardNames` to an Array * Fix import * Fix tests |
||
|---|---|---|
| .. | ||
| src | ||
| types | ||
| index.js | ||
| index.mjs | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
@uppy/react
React component wrappers around Uppy's officially maintained UI plugins.
Uppy is being developed by the folks at Transloadit, a versatile file encoding service.
Example
const Uppy = require('@uppy/core')
const { DashboardModal } = require('@uppy/react')
const uppy = new Uppy()
class Example extends React.Component {
state = { open: false }
render () {
return (
<DashboardModal
uppy={uppy}
open={this.state.open}
onRequestClose={this.handleClose}
/>
)
}
// ..snip..
}
Installation
$ npm install @uppy/react
We recommend installing from npm and then using a module bundler such as Webpack, Browserify or Rollup.js.
Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case Uppy will attach itself to the global window.Uppy object. See the main Uppy documentation for instructions.
Documentation
Documentation for this plugin can be found on the Uppy website.