@agnos-ui/core
Version:
Framework-agnostic headless component library.
17 lines (16 loc) • 534 B
TypeScript
import type { Directive } from '../types';
/**
* Represents the arguments for a portal directive.
*/
export type PortalDirectiveArg = {
container?: HTMLElement | null | undefined;
insertBefore?: HTMLElement | null | undefined;
} | null | undefined;
/**
* Creates a portal directive, allowing to attach content to any element.
*
* @param content - the content of the portal
* @param newArg - {@link PortalDirectiveArg} args
* @returns the portal directive
*/
export declare const portal: Directive<PortalDirectiveArg>;