okDialog.js 514 B

123456789101112131415161718
  1. const html = require('choo/html');
  2. module.exports = function(message) {
  3. return function(state, emit, close) {
  4. return html`
  5. <send-ok-dialog class="flex flex-col max-w-xs p-4">
  6. <div class="text-center m-8 leading-normal">${message}</div>
  7. <button
  8. class="btn rounded-lg w-full flex-no-shrink"
  9. onclick="${close}"
  10. title="${state.translate('okButton')}"
  11. >
  12. ${state.translate('okButton')}
  13. </button>
  14. </send-ok-dialog>
  15. `;
  16. };
  17. };