Skip to content

Commit

Permalink
feat: add default property to classNames to the toast function and To…
Browse files Browse the repository at this point in the history
…aster component
  • Loading branch information
imopbuilder committed Dec 3, 2023
1 parent 7560716 commit 6e2e47f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ const toastFunction = (message: string | React.ReactNode, data?: ExternalToast)
ToastState.addToast({
title: message,
...data,
type: 'default',
id,
});
return id;
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -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>);

Expand All @@ -23,6 +23,7 @@ export interface ToastClassnames {
error?: string;
info?: string;
warning?: string;
default?: string;
}

export interface ToastT {
Expand Down

0 comments on commit 6e2e47f

Please sign in to comment.