Skip to main content

Notification Item

Overview

LMNotificationFeedItem is used to display notification. It includes information such as the notification message, the time of the notification, user details, and an optional media image. The view highlights whether the notification has been read.

GitHub File:

LMFeedNotificationView

Customisations

These customisations can be applied through setNotificationFeedStyles method on the STYLES class

PropertyTypeDescription
screenHeaderLMHeaderPropsProps to customize the screen header.
backgroundColorstringBackground color of the notification feed screen.
unreadBackgroundColorstringBackground color for unread notifications.
activityTextStylesTextStyleStyle for the activity text.
timestampTextStylesTextStyleStyle for the timestamp text.
userImageStylesobjectStyles and props for the user image.
├─ fallbackTextStyleTextStyleStyle for fallback text if image is not available.
├─ sizenumberSize of the profile image.
├─ onTap() => voidCallback when user image is tapped.
├─ fallbackTextBoxStyleViewStyleStyle for the fallback text container.
├─ profilePictureStyleImageStyleStyle for the profile picture image.
activityAttachmentImageStyleLMIconPropsStyle and props for the attachment image shown in activity.
noActivityViewTextstringText displayed when there are no activities.
noActivityViewTextStyleTextStyleStyle for the no-activity view text.
noActivityViewImageReact.ReactNodeImage displayed when there are no activities.
noActivityViewImageStyleImageStyleStyle for the no-activity view image.
customScreenHeaderReact.ReactNodeCustom header component for the screen.
activityTextComponentFunctionCustom component/function to render activity text.

Usage Example

import { STYLES } from "@likeminds.community/feed-rn-core"

STYLES.setNotificationFeedStyles({
screenHeader: {
backIcon: {
iconUrl: "asset/path"
},
},
activityTextStyles: {
fontFamily: 'roboto',
fontSize: 20
},
noActivityViewText: "no new notifications",
noActivityViewImage: "asset/path"
})