From 6e2e47f32872d9c33516e860371410c1441fece0 Mon Sep 17 00:00:00 2001 From: imopbuilder Date: Sun, 3 Dec 2023 11:23:29 +0530 Subject: [PATCH] feat: add default property to classNames to the toast function and Toaster component --- src/state.ts | 1 + src/types.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/state.ts b/src/state.ts index 89e8df1..5503829 100644 --- a/src/state.ts +++ b/src/state.ts @@ -174,6 +174,7 @@ const toastFunction = (message: string | React.ReactNode, data?: ExternalToast) ToastState.addToast({ title: message, ...data, + type: 'default', id, }); return id; diff --git a/src/types.ts b/src/types.ts index 6444dd9..407a1e5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,6 @@ import React from 'react'; -export type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | 'error' | 'loading'; +export type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default'; export type PromiseT = Promise | (() => Promise); @@ -23,6 +23,7 @@ export interface ToastClassnames { error?: string; info?: string; warning?: string; + default?: string; } export interface ToastT {