uppy/src/plugins/Dummy.js

34 lines
731 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Plugin from './Plugin'
import yo from 'yo-yo'
/**
* Dummy
*
*/
export default class Dummy extends Plugin {
constructor (core, opts) {
super(core, opts)
this.type = 'acquirer'
this.name = 'Dummy'
// set default options
const defaultOptions = {}
// merge default options with the ones set by user
this.opts = Object.assign({}, defaultOptions, opts)
}
render () {
return yo`
<div class="wow-this-works">
I am a dummy plugin, look at me, I was rendered in a modal! Thats crazy, I know.
</div>
`
}
install () {
const caller = this
this.el = this.render(this.core.state)
this.target = this.getTarget(this.opts.target, caller, this.el)
}
}