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:
Customisations
These customisations can be applied through setNotificationFeedStyles
method on the STYLES
class
Property | Type | Description |
---|---|---|
screenHeader | LMHeaderProps | Props to customize the screen header. |
backgroundColor | string | Background color of the notification feed screen. |
unreadBackgroundColor | string | Background color for unread notifications. |
activityTextStyles | TextStyle | Style for the activity text. |
timestampTextStyles | TextStyle | Style for the timestamp text. |
userImageStyles | object | Styles and props for the user image. |
├─ fallbackTextStyle | TextStyle | Style for fallback text if image is not available. |
├─ size | number | Size of the profile image. |
├─ onTap | () => void | Callback when user image is tapped. |
├─ fallbackTextBoxStyle | ViewStyle | Style for the fallback text container. |
├─ profilePictureStyle | ImageStyle | Style for the profile picture image. |
activityAttachmentImageStyle | LMIconProps | Style and props for the attachment image shown in activity. |
noActivityViewText | string | Text displayed when there are no activities. |
noActivityViewTextStyle | TextStyle | Style for the no-activity view text. |
noActivityViewImage | React.ReactNode | Image displayed when there are no activities. |
noActivityViewImageStyle | ImageStyle | Style for the no-activity view image. |
customScreenHeader | React.ReactNode | Custom header component for the screen. |
activityTextComponent | Function | Custom 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"
})