fox-send/app/templates/downloadButton/index.js

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