Base Components | Description |
---|---|
List Item | This renders common components used across Conversations , Groups & Users . |
property | type | Description |
---|---|---|
template | CometChatMessageTemplate | Sets a custom message template for the message information view. |
message | CometChat.BaseMessage | Sets the message to be displayed in the message information view. |
ErrorStateView | () => JSX.Element | Sets the visibility of the error view in the message information view. |
title | String | Sets the title that will be displayed at the top of the message information . |
ListItemView | message: CometChat.BaseMessage, receipt: Recipient) => JSX.Element | Sets a custom list item view for individual entries in the message information view. |
receiptDatePattern | ((timestamp: number) => string) | Sets a custom date pattern for formatting receipt dates in the message information view. |
messageInformationStyle | MessageInformationStyleInterface | Sets the overall style and appearance for the message information view. |
readIcon | ImageType | Sets the custom icon resource for read receipts in the message information view. |
deliveredIcon | ImageType | Sets the custom icon resource for delivered receipts in the message information view. |
loadingIcon | ImageType | Sets the custom icon resource loading state. |
listItemStyle | ListItemStyleInterface | Sets the style for list items in the message information view. |
onError | ((error: CometChatException) => void) | Sets the error callback to handle any errors that may occur within the message information view. |
emptyStateText | String | Sets the text to be displayed in the empty state view of the message information view. |
errorStateText= | String | Sets the error message to be displayed in the error state view of the message information view. |
EmptyStateView | () => JSX.Element | Sets the custom layout resource for the empty state view of the message information view. |
ErrorStateView | () => JSX.Element | Sets the custom layout resource for the error state view of the message information view. |
LoadingStateView | () => JSX.Element | Sets the custom layout resource for the loading state view of the message information view. |
onBack
event is typically triggered when the close button is clicked and it carries a default action. However, with the following code snippet, you can effortlessly override this default operation.
messageInformationStyle
property.
Property | Description | Code |
---|---|---|
titleTextFont | Sets the font for the title | titleTextFont?: FontStyleInterface; |
titleTextColor | Sets the font for the title | titleTextColor?: string; |
subtitleTextColor | Sets the text color for the subtitle | subtitleTextColor?: string; |
subtitleTextFont | Sets the text font for the subtitle | subtitleTextFont?: FontStyleInterface; |
sendIconTint | Sets the icon color for the send Icon | sendIconTint?: string; |
readIconTint | Sets the icon color for the read Icon | readIconTint?: string; |
deliveredIconTint | Sets the icon color for the delivered Icon | deliveredIconTint?: string; |
dividerTint | Sets the icon color for the separator | dividerTint?: string; |
border | Used to set border | border?: BorderStyleInterface, |
borderRadius | Used to set border radius | borderRadius?: number; |
backgroundColor | Used to set background colour | backgroundColor?: string; |
height | Used to set height | height?: string; |
width | Used to set width | width?: string; |
ListItemStyle
component in the MessageInformation Component, you can use the following code snippet. For further insights on ListItemStyle
Styles refer
Property | Description | Code |
---|---|---|
message | Sets the message to be displayed in the message information view. | message: CometChat.BaseMessage |
errorStateView | used to show the error state view in case of an error occurred. | ErrorStateView?: () => JSX.Element |
deliveredIcon | It is used to pass user defined image in to the MessageReceipt, to change the icon When Message is delivered. | deliveredIcon?: ImageType |
readIcon | It is used to pass user defined image in to the MessageReceipt, to change the icon When Message is read. | readIcon?: ImageType |
receiptDatePattern | used to set the date pattern for delivered and read date time | receiptDatePattern?: (timestamp) => string |
emptyStateText | used to set a custom text response when fetching the users has returned an empty list | emptyStateText?: string |