From a03cc406b1a75acbcb14c3ee0ed9d3da25c68a0a Mon Sep 17 00:00:00 2001 From: Shakeeb Sadikeen Date: Sat, 8 Dec 2018 09:54:05 +0530 Subject: [PATCH] updated types with new icon callback type defs. #57 --- types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index ea26727..5efa122 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -13,7 +13,7 @@ interface ToastObject { type ToastPosition = 'top-right' | 'top-center' | 'top-left' | 'bottom-right' | 'bottom-center' | 'bottom-left' type ToastType = 'success' | 'info' | 'error' | 'default' type ToastTheme = 'primary' | 'outline' | 'bubble' -type ToastIconPack = 'material' | 'fontawesome' | 'custom-class' +type ToastIconPack = 'material' | 'fontawesome' | 'custom-class' | 'callback' interface ToastAction { /** @@ -78,7 +78,7 @@ interface ToastOptions { /** * Material icon name as string */ - icon?: string | { name: string, after: boolean }, + icon?: (ToastIcon: HTMLElement) => HTMLElement | string | { name: string, after: boolean }, /** * Type of the Toast ['success', 'info', 'error']. (default: 'default') */