Skip to main content

LMFeedActivityHeader

LMFeedActivityHeader renders the header section of the activity feed, displaying navigation controls, filters, and sorting options. It manages the feed's view state and user preferences for content organization.

Props

PropertyTypeDescriptionOptional
propReportGroupReport | undefinedContains the report data for a group post or commentYes

CSS Classnames

ClassnameDescription
lm-feed-wrapper__card__header__menu-items-containerContainer for menu items in the activity header
moderation-post-header-title-end post-header-title-end-custom-styleStyles the end section of the post header title
lm-flex-containerFlexbox container for flexible layout arrangement
closed-header-wrapperWrapper for closed/archived post headers
editedIndicates edited status of the post
lm-feed-wrapper__card__headerMain header container for feed cards
lm-feed-wrapper__card__header--titleStyles the title section of the header
lm-feed-wrapper__card__header--textText content styling in the header
lm-primary-text lm-post-badgeBadge styling for post status indicators
lm-avatar lm-mr-5Avatar image with right margin spacing
moderation-post-header-names__capitalize post-header-user-custom-styleUser name display in moderation view
moderation-post-header-namesContainer for user names in moderation
moderation-post-header-alert activity-header-custom-styleAlert styling in activity header
question-mark-icon closed-header-wrapper-question-iconQuestion mark icon for closed posts
three-dot-menu-image lm-cursor-pointer lm-mr-4Three-dot menu icon with hover effect
moderation-post-header-names post-header-user-custom-styleUser name styling in moderation view
moderation-closed-headerHeader styling for closed moderation items
approval-pending-iconIcon indicating pending approval status

Example

To customize the component with these classnames, open your base CSS file and override the styles using the classname:

.lm-feed-wrapper__card__header__menu-items-container {
font-size: 18px;
color: red;
}

Advanced Customisation

Customising Moderation Header Leading Icon

You can also pass your custom icon to replace the default icon for ModerationHeaderLeadingIcon.

Below is an example for customising the icon for ModerationHeaderLeadingIcon and rendering your own icon. It is fairly a 2 simple step process

  • Step 1: Create your own custom view.
import {
LMSocialFeed,
LMFeedNotificationHeader,
LMFeedUniversalFeed,
LMFeedCustomEvents,
initiateFeedClient,
} from "@likeminds.community/likeminds-feed-reactjs";

// Custom Icon for ModerationHeaderLeadingIcon
const LMFeedCustomIconsCallback = {
moderationHeaderLeadingIcon: () => {
return (
// Your Custom Code
);
};
}
  • Step 2: Pass your Custom View to LMSocialFeed
import {
LMSocialFeed,
LMFeedNotificationHeader,
LMFeedUniversalFeed,
LMFeedCustomEvents,
initiateFeedClient,
} from "@likeminds.community/likeminds-feed-reactjs"

const App = () => {
const lmFeedClient = initiateFeedClient()

return (
<div className="lm-wrapper">
<LMFeedNotificationHeader customEventClient={customEventClient} />
<LMSocialFeed
client={lmFeedClient}
customEventClient={customEventClient}
userDetails={userDetails}
LMFeedCustomIcons={LMFeedCustomIconsCallback}
>
<LMFeedUniversalFeed />
</LMSocialFeed>
</div>
)
}
export default App

Reference

For reference, check out this file