Overlays & confirmation
usePopoverService
Opens any component as an anchored popover from code instead of markup. Its result promise resolves with the value the popover closes with. Use it for popovers you open from a function.
Opens anchored popovers from code instead of markup, with the same behavior as <Popover>. openPopover(Component, options) mounts any component inside a Popover anchored to options.triggerEl. triggerEl is required, because a popover opened from code has no #trigger slot. Its result promise settles with the value the opened component passes to usePopoverRef().close(result). confirmAction({ surface: 'popover' }) is built on it. Use it for anything beyond a plain confirm.
Install
import { openPopover, usePopoverRef, usePopoverQueue } from 'vael-ui'