From 776b36b3512c5c678952e9650a11f7cfd0eeedf8 Mon Sep 17 00:00:00 2001 From: Op Builder <150527559+imopbuilder@users.noreply.github.com> Date: Tue, 26 Dec 2023 04:41:34 +0530 Subject: [PATCH] feat: add default property to classNames to the toast function and Toaster component (#245) --- 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 {