Practic BUI (Base UI) - v1.0.0
    Preparing search index...
    • Asks the user to confirm an action in the theme's alert dialog, instead of the browser's window.confirm, which ignores the app's look and blocks the page. Call sites read like window.confirm but await the answer:

      const [confirm, confirmDialog] = useConfirm()
      if (!(await confirm({ title: 'Delete this item?', confirmLabel: 'Delete', confirmVariant: 'danger' }))) return
      // render `confirmDialog` somewhere that stays mounted while the question is open

      Returns readonly [(options: ConfirmOptions) => Promise<boolean>, Element]

      confirm, which opens the dialog and resolves to whether the user confirmed, and the dialog element to render.