send/app/templates/downloadButton/index.js

16 lines
334 B
JavaScript
Raw Normal View History

2018-01-24 18:23:13 +00:00
const html = require('choo/html');
module.exports = function(state, emit) {
function download(event) {
event.preventDefault();
emit('download', state.fileInfo);
}
return html`
<div>
<button class="btn btn--download"
2018-01-24 18:23:13 +00:00
onclick=${download}>${state.translate('downloadButtonLabel')}
</button>
</div>`;
};