mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-07 14:13:58 -05:00
Fix broken types in imported library
This commit is contained in:
24
lib/types/ToasterTypes.ts
Normal file
24
lib/types/ToasterTypes.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
export interface Toast {
|
||||
id: string;
|
||||
message: React.ReactNode;
|
||||
hideTime: Date;
|
||||
}
|
||||
|
||||
export interface ToastProviderState {
|
||||
toast: Toast[];
|
||||
hideToast: (id: string) => void;
|
||||
addToast: (message: React.ReactNode, duration?: number) => string;
|
||||
addSuccess: (message: React.ReactNode, duration?: number) => string;
|
||||
addWarning: (message: React.ReactNode, duration?: number) => string;
|
||||
addDanger: (message: React.ReactNode, duration?: number) => string;
|
||||
}
|
||||
|
||||
export interface ToastProviderProps {
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface ToasterProps {
|
||||
toast: Toast[];
|
||||
className?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user