send/app/templates/downloadButton/index.js
2018-02-17 15:07:47 -08:00

13 lines
317 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();
emit('download', state.fileInfo);
}
};