Overlays & confirmation
confirmAction
A confirm step, shown as a centered dialog or a popover anchored to a trigger, that waits for your async handler before it closes. Use it before an action that’s hard to undo.
Opens a confirm flow with one function call. It shows a centered dialog by default (surface: 'dialog'), or a popover anchored to triggerEl with surface: 'popover'. TypeScript offers only the options that fit the surface you pick. The confirm button shows its loading state while onConfirm runs, and the surface closes only when it succeeds. If onConfirm rejects, the surface stays open and onError fires. confirmAction wraps openDialog and openPopover; use those for anything it doesn't cover.
Install
import { confirmAction } from 'vael-ui'