send/app/templates/downloadButton/index.js

15 lines
350 B
JavaScript
Raw Normal View History

2018-01-24 18:23:13 +00:00
const html = require('choo/html');
module.exports = function(state, emit) {
2018-02-16 20:56:53 +00:00
return html`
<button class="btn btn--download"
onclick=${download}>${state.translate('downloadButtonLabel')}
</button>`;
2018-01-24 18:23:13 +00:00
function download(event) {
event.preventDefault();
2018-07-09 22:39:06 +00:00
console.log("DOWNLOAD FIRE")
2018-01-24 18:23:13 +00:00
emit('download', state.fileInfo);
}
};