An opinionated toast component for React.
feat: add default property to classNames to the toast function and Toaster component (#245)
Op Builder776b36b3512c
diff --git a/src/state.ts b/src/state.tsindex 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.tsindex 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<Data = any> = Promise<Data> | (() => Promise<Data>);@@ -23,6 +23,7 @@ export interface ToastClassnames {error?: string;info?: string;warning?: string;+ default?: string;}export interface ToastT {