MessageListItem
Represents a single message in a message list. Can be themed with [theme.Chat.MessageListItem]{@link MessageListItem.MessageListItemThemeProps}
Component children#
| Key | Component | Condition | Align | Description |
|---|---|---|---|---|
| content | div | Wrapper for message content. Displays the avatar of the author and the message in a `MessageBubble` component | ||
| media-transfer-error | styled(div) | Visible if `message.error` prop is `true` | Wrapper for message shown when message failed to be sent. Displays a `AlertSmall` icon and `MediaMessageTransferFailed` template | |
| read-status | styled(div) | Wrapper for read status. Displays `Read` template and `Read` icon |
Static Properties#
| Name | Description | Type |
|---|---|---|
| Content | Dynamic content store | DynamicContentStore.<MessageListItem.MessageListItemProps> |
| Bubble | Shortcut for MessageBubble component | MessageBubble |
Component Properties
message: MessageStateAn object which represents a single message.
showReadStatus?: booleanShould show read status.
messageStyle?: MessageStyleIdentifies how the message should be displayed.
useFriendlyName?: booleanAn override to use the friendly name passed in member.
authorName?: stringA custom author name to be used.
avatarUrl?: stringUrl to the avatar of the author.
hasMarkdownSupport?: booleanWhether Markdown feature is enabled or not
member?: objectObject containing a pre-defined author name
member.friendlyName: stringPredefined author name.
timestampFormatter: functionA custom formatter for the message timestamp. Takes a Date argument and returns string.