UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

17 lines (16 loc) 769 B
import React from 'react'; import type { PropsWithChildren } from 'react'; export type MessageListContextValue = { /** The scroll container within which the messages and typing indicator are rendered */ listElement: HTMLDivElement | null; /** Function that scrolls the `listElement` to the bottom. */ scrollToBottom: () => void; }; export declare const MessageListContext: React.Context<MessageListContextValue | undefined>; /** * Context provider for components rendered within the `MessageList` */ export declare const MessageListContextProvider: ({ children, value, }: PropsWithChildren<{ value: MessageListContextValue; }>) => React.JSX.Element; export declare const useMessageListContext: (componentName?: string) => MessageListContextValue;