index.js 350 B

1234567891011121314
  1. const html = require('choo/html');
  2. module.exports = function(state, emit) {
  3. return html`
  4. <button class="btn btn--download"
  5. onclick=${download}>${state.translate('downloadButtonLabel')}
  6. </button>`;
  7. function download(event) {
  8. event.preventDefault();
  9. console.log("DOWNLOAD FIRE")
  10. emit('download', state.fileInfo);
  11. }
  12. };