Universal Feed Header
The LMUniversalFeedHeader
component is designed to serve as the header of the Universal Feed screen. It displays the app's title and a notification bell icon, indicating any unread notifications with a badge. This component leverages contextual styling and behavior, enabling it to adapt to different themes and respond to user interactions.
Overview
LMUniversalFeedHeader
is a reusable component that offers:
- A customizable header with a title.
- A notification bell icon, which changes color based on the theme.
- An optional notification badge displaying the count of unread notifications.
UI Components
Integration
To use this component, import it and add it as a child of the UniversalFeed
.
Here’s how you integrate LMUniversalFeedHeader
within a screen:
import React, { useEffect } from "react";
import {
LMUniversalFeedHeader,
UniversalFeed,
STYLES,
} from "@likeminds.community/feed-rn-core";
const FeedScreen = () => {
// to customise ui
useEffect(() => {
STYLES.setUniversalFeedStyles({
screenHeader: {
headingTextStyle: {
color: "blue",
},
},
});
}, []);
return (
<UniversalFeed>
<LMUniversalFeedHeader />
{/* Other feed components */}
</UniversalFeed>
);
};
export default FeedScreen;
- Use the
FeedScreen
component with all other feed components as a child of theUniversalFeed
component in the relevant screens: