send/app/templates/downloadButton/index.js
2018-07-09 15:39:06 -07:00

14 lines
350 B
JavaScript

const html = require('choo/html');
module.exports = function(state, emit) {
return html`
<button class="btn btn--download"
onclick=${download}>${state.translate('downloadButtonLabel')}
</button>`;
function download(event) {
event.preventDefault();
console.log("DOWNLOAD FIRE")
emit('download', state.fileInfo);
}
};