JSFiddle - React, Tailwind, and code Playground
HTML
<dialog open>
<p>Greetings, one and all!</p>
<button>Ok</button><button>Maybe</button><button>Cancel</button>
</dialog>
JavaScript
document.querySelectorAll('button').forEach($button =>
$button.onclick = () => document.querySelector('dialog').removeAttribute('open'))