Dialog shennanegins

TIL the button callbacks for Dialog.prompt and Dialog.confirm can be asynchronous.

const foo = async () => {
const response = await Dialog.prompt({
  title: "Confirmation Title",
  content: "Are you sure about that?",
  callback: async (html) => { return 'foo' },
});

console.log('responded', response); // 'foo' when the button is pressed
};

foo()
Was this page helpful?