diff --git a/src/types.ts b/src/types.ts index 57d80fc..77f6feb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,24 +15,33 @@ export interface RouterHook { export interface ToastData { title: ReactNode; body: ReactNode; - header?: ReactNode; - fullTemplateTitle?: ReactNode; - timestamp?: Date; + subtext?: ReactNode; logo?: ReactNode; icon?: ReactNode; + timestamp?: Date; onClick?: () => void; className?: string; contentClassName?: string; + /** ms before toast popup is hidden. defaults to 5 seconds */ duration?: number; + /** ms before toast is removed from the tray. Valve's logic will always remove all toasts 48h after they are first viewed regardless of this value */ + expiration?: number; critical?: boolean; eType?: number; sound?: number; + /** Hidden 10min after first viewed */ + showNewIndicator?: boolean; playSound?: boolean; showToast?: boolean; } +export interface ToastNotification { + data: ToastData, + dismiss: () => void; +} + export interface Toaster { - toast(toast: ToastData): void; + toast(toast: ToastData): ToastNotification; } export interface FilePickerRes {