UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

21 lines (20 loc) 920 B
import React from 'react'; import type { UserResponse } from 'stream-chat'; export type AvatarProps = { /** Custom root element class that will be merged with the default class */ className?: string; /** Image URL or default is an image of the first initial of the name if there is one */ image?: string | null; /** Name of the image, used for title tag fallback */ name?: string; /** click event handler attached to the component root element */ onClick?: (event: React.BaseSyntheticEvent) => void; /** mouseOver event handler attached to the component root element */ onMouseOver?: (event: React.BaseSyntheticEvent) => void; /** The entire user object for the chat user displayed in the component */ user?: UserResponse; }; /** * A round avatar image with fallback to username's first letter */ export declare const Avatar: (props: AvatarProps) => React.JSX.Element;