five-on-it / apps/client/src/ui/kit/Dialog
apps/client/src/ui/kit/Dialog
The kit's dialogs, styled by the theme (kit.css): Dialog, a modal on the browser's own <dialog> (the focus kept inside it, Escape closing it, the page under it dimmed and out of reach, drawn in the page's body whatever renders it), and useConfirm, which asks a question before something that cannot be undone (a deletion, a reset) and answers whether the player went ahead. Its buttons are #confirm-ok and #confirm-cancel, the dialog #confirm-dialog: the end-to-end tests' contract.