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 (#245)
  • Loading branch information
imopbuilder authored Dec 25, 2023
1 parent c54813d commit 776b36b
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

1 comment on commit 776b36b

@vercel
Copy link

@vercel vercel bot commented on 776b36b Dec 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.