UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

60 lines (57 loc) 1.67 kB
import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Popover.pt} * @group Interface */ interface PopoverPassThroughOptions<I = unknown> { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the content's DOM element. */ content?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in Popover. * @see {@link PopoverPassThroughOptions} * * @template I Type of instance. */ type PopoverPassThrough<I = unknown> = PassThrough<I, PopoverPassThroughOptions<I>>; /** * Custom content template context. * @group Interface */ interface PopoverContentTemplateContext { /** * Callback to close the popover. */ closeCallback: VoidFunction; } /** * Defines valid templates in Popover. * @group Templates */ interface PopoverTemplates { /** * Custom template of content. * @param {PopoverContentTemplateContext} context - content context. */ content(context: PopoverContentTemplateContext): TemplateRef<PopoverContentTemplateContext>; } export type { PopoverContentTemplateContext, PopoverPassThrough, PopoverPassThroughOptions, PopoverTemplates };