@kushki/ng-suka
Version:
<p align="center"> <h1 align="center">Suka Components Angular</h1> <p align="center"> An Angular implementation of the Suka Design System </p> </p>
31 lines (30 loc) • 858 B
TypeScript
import { Injector, TemplateRef } from '@angular/core';
import { Overlay } from '@angular/cdk/overlay';
import { ToastRef } from './toast-ref';
export declare type ToastType = 'info' | 'success' | 'attention' | 'alert';
export interface ToastContent {
type: ToastType;
body?: string | TemplateRef<any>;
}
export interface ToastConfig {
content?: ToastContent;
position?: {
top: number;
};
animation?: {
fadeOut: number;
fadeIn: number;
};
}
export declare class ToastService {
private injector;
private overlay;
private lastToast;
constructor(injector: Injector, overlay: Overlay);
show(config?: ToastConfig): ToastRef;
private createOverlay;
private attachToastContainer;
private createInjector;
private getOverlayConfig;
getPosition(config: ToastConfig): string;
}