From e8345efea2403442c29ccc1be00e3b40178c7fcd Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Thu, 9 Jan 2020 19:20:52 +0300 Subject: [PATCH] refactor(theme-shared): change toaster types and interfaces related issue: #2537 --- .../theme-shared/src/lib/models/toaster.ts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts b/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts index f029911dae..4f407d129d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts @@ -1,17 +1,25 @@ export namespace Toaster { - export interface Options { - id?: any; - closable?: boolean; + export interface ToastOptions { life?: number; sticky?: boolean; - data?: any; + closable?: boolean; + tapToDismiss?: boolean; messageLocalizationParams?: string[]; titleLocalizationParams?: string[]; + id: any; + containerKey?: string; + } + + export interface Toast { + message: string; + title?: string; + severity?: string; + options?: ToastOptions; } - export type Severity = 'success' | 'info' | 'warn' | 'error'; + export type Severity = 'neutral' | 'success' | 'info' | 'warning' | 'error'; - export const enum Status { + export enum Status { confirm = 'confirm', reject = 'reject', dismiss = 'dismiss',