UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

10 lines (9 loc) 814 B
import type { StreamMessage } from '../../../context'; import type { ReactEventHandler } from '../types'; import type { DefaultStreamChatGenerics } from '../../../types/types'; export type MarkUnreadHandlerNotifications<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = { getErrorNotification?: (message: StreamMessage<StreamChatGenerics>) => string; getSuccessNotification?: (message: StreamMessage<StreamChatGenerics>) => string; notify?: (notificationText: string, type: 'success' | 'error') => void; }; export declare const useMarkUnreadHandler: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(message?: StreamMessage<StreamChatGenerics>, notifications?: MarkUnreadHandlerNotifications<StreamChatGenerics>) => ReactEventHandler;