1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-11 21:52:39 +01:00
send/app/templates/downloadButton/index.js

14 lines
317 B
JavaScript
Raw Normal View History

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