stream-chat-react
Version:
React components to create chat conversations or livestream style chat
27 lines (26 loc) • 1.02 kB
TypeScript
import React from 'react';
import type { AvatarProps } from '../../Avatar';
export type UserItemProps = {
/** The user */
entity: {
/** The parts of the Name property of the entity (or id if no name) that can be matched to the user input value.
* Default is bold for matches, but can be overwritten in css.
* */
tokenizedDisplayName: {
token: string;
parts: string[];
};
/** Id of the user */
id?: string;
/** Image of the user */
image?: string;
/** Name of the user */
name?: string;
};
/** Custom UI component to display user avatar, defaults to and accepts same props as: [Avatar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/Avatar.tsx) */
Avatar?: React.ComponentType<AvatarProps>;
};
/**
* UI component for mentions rendered in suggestion list
*/
export declare const UserItem: ({ Avatar, entity }: UserItemProps) => React.JSX.Element | null;