The width of the content.
Customizations for the inbox message cell.
The data model for the inbox message.
Function to delete a message row.
The ID of the message to delete.
Function to handle message selection.
The ID of the message to select.
The index of the message to select.
The index of the message cell.
Indicates if the device is in portrait mode.
Indicates if this is the last message cell in a list.
Function to specify a layout for the message row.
Is this the last message in the list?
The view model for the inbox row.
A tuple containing a React node and a number, or undefined/null.
To specify a custom layout for your inbox rows, when you instantiate your
IterableInbox
, assign a function to its messageListItemLayout
prop. The
inbox will call this function for each of its rows, and it should return:
const ROW_HEIGHT = 100;
// Custom layout for the message row
const renderCustomLayout = (
isLast: boolean,
rowViewModel: IterableInboxRowViewModel,
) => {
return [
// Component shown in the message row
<View>
<Text>Title: {rowViewModel.inAppMessage.inboxMetadata?.title}</Text>
<Text>Body: {rowViewModel.inAppMessage.inboxMetadata?.subtitle}</Text>
<Text>Date: {rowViewModel.createdAt}</Text>
<Text>Has been read: {rowViewModel.read === true}</Text>
</View>,
// Height of the row
ROW_HEIGHT,
];
}
<IterableInbox messageListItemLayout={renderCustomLayout} />
The view model for the inbox row.
Function to check if swiping should be enabled.
Should swiping be enabled?
Props for the IterableInboxMessageCell component.