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);
|
|
|
|
}
|
|
|
|
};
|