ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
33 lines (32 loc) • 1.27 kB
TypeScript
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
import { TemplateRef } from '@angular/core';
import { Subject } from 'rxjs';
import { NgClassInterface, NgStyleInterface } from 'ng-zorro-antd/core/types';
export declare type NzNotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
export interface NzNotificationDataOptions<T = {}> {
nzKey?: string;
nzStyle?: NgStyleInterface;
nzClass?: NgClassInterface | string;
nzCloseIcon?: TemplateRef<void> | string;
nzPlacement?: NzNotificationPlacement;
nzData?: T;
nzDuration?: number;
nzAnimate?: boolean;
nzPauseOnHover?: boolean;
}
export interface NzNotificationData {
content?: string | TemplateRef<void>;
createdAt?: Date;
messageId?: string;
options?: NzNotificationDataOptions;
state?: 'enter' | 'leave';
template?: TemplateRef<{}>;
title?: string;
type?: 'success' | 'info' | 'warning' | 'error' | 'blank' | string;
onClose?: Subject<boolean>;
onClick?: Subject<MouseEvent>;
}
export declare type NzNotificationRef = Pick<Required<NzNotificationData>, 'onClose' | 'onClick' | 'messageId'>;