@skyux/core
Version:
This library was generated with [Nx](https://nx.dev).
43 lines (42 loc) • 1.53 kB
TypeScript
import { ComponentRef, StaticProvider, TemplateRef, Type } from '@angular/core';
import { Observable } from 'rxjs';
import { SkyOverlayConfig } from './overlay-config';
import { SkyOverlayComponent } from './overlay.component';
/**
* Represents a new overlay instance. It is used to manage the "closed" state of the overlay,
* and access any public members on the appended content component instance.
*/
export declare class SkyOverlayInstance {
#private;
/**
* The configuration for the overlay.
*/
readonly config: SkyOverlayConfig;
readonly componentRef: ComponentRef<SkyOverlayComponent>;
/**
* Emits when the overlay is clicked (but not its content).
*/
get backdropClick(): Observable<void>;
/**
* Emits after the overlay is closed.
*/
get closed(): Observable<void>;
id: string;
constructor(
/**
* The configuration for the overlay.
*/
config: SkyOverlayConfig, componentRef: ComponentRef<SkyOverlayComponent>);
/**
* Creates and attaches a component to the overlay.
* @param component The component to attach.
* @param providers Custom providers to apply to the component.
*/
attachComponent<C>(component: Type<C>, providers?: StaticProvider[]): C;
/**
* Attaches a `TemplateRef` to the overlay.
* @param templateRef The `TemplateRef` to attach.
* @param context The context to provide to the template.
*/
attachTemplate<T>(templateRef: TemplateRef<T>, context?: T): void;
}