stream-chat-react
Version:
React components to create chat conversations or livestream style chat
31 lines • 1.62 kB
TypeScript
import type { MessageContextValue } from '../../context';
import type { ReactionGroupResponse, ReactionResponse } from 'stream-chat';
import type { ReactionsComparator } from './types';
export type MessageReactionsProps = Partial<Pick<MessageContextValue, 'handleFetchReactions' | 'reactionDetailsSort'>> & {
/** An array of the own reaction objects to distinguish own reactions visually */
own_reactions?: ReactionResponse[];
/** An object containing summary for each reaction type on a message */
reaction_groups?: Record<string, ReactionGroupResponse>;
/** An array of the reaction objects to display in the list */
reactions?: ReactionResponse[];
/** Display the reactions in the list in reverse order, defaults to false */
reverse?: boolean;
/** Comparator function to sort reactions, defaults to chronological order */
sortReactions?: ReactionsComparator;
/**
* Positioning of the reactions list relative to the message. Position is flipped by default for the messages of other users.
*/
flipHorizontalPosition?: boolean;
verticalPosition?: 'top' | 'bottom' | null;
visualStyle?: 'clustered' | 'segmented' | null;
capLimit?: {
[key in Extract<MessageReactionsProps['visualStyle'], string>]?: number;
};
};
declare const UnMemoizedMessageReactions: (props: MessageReactionsProps) => import("react/jsx-runtime").JSX.Element | null;
/**
* Component that displays a list of reactions on a message.
*/
export declare const MessageReactions: typeof UnMemoizedMessageReactions;
export {};
//# sourceMappingURL=MessageReactions.d.ts.map