okDialog.js 556 B

1234567891011121314151617181920
  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-sm p-4 m-auto">
  6. <h2 class="text-center text-xl font-bold m-8 leading-normal">
  7. ${message}
  8. </h2>
  9. <button
  10. class="btn rounded-lg w-full flex-shrink-0"
  11. onclick="${close}"
  12. title="${state.translate('okButton')}"
  13. >
  14. ${state.translate('okButton')}
  15. </button>
  16. </send-ok-dialog>
  17. `;
  18. };
  19. };