Overlays & confirmation
useDialogService
Opens any component as a dialog from code instead of markup. Its result promise resolves with the value the dialog closes with. Use it for dialogs you open from a function.
Opens dialogs from code instead of markup, with the same behavior as <Dialog>. openDialog(Component, options) mounts any component as the dialog body, with typed props. Its result promise settles with the value the opened component passes to useDialogRef().close(result). confirmAction() is built on it. Use it for anything beyond a plain confirm, such as a rename form or a multi-step flow.
Install
import { openDialog, useDialogRef, useDialogQueue } from 'vael-ui'