Skip to main content

LMUserProfileSection

LMUserProfileSection is a React component designed to display the user's profile section within the context of creating or editing a post. It showcases the user's profile picture (or initials as a fallback) and the user's name, leveraging styles and data from the context.

GitHub File:

LMFeedPostContent

Styling Customisations

PropTypeDescription
postHeaderStyleobjectCustom styles for the post header.
userNameTextStyleTextStyleCustom styles for the user name.

To see all the properties, visit PostListStyleProps.header & CreatePostStyleProps.userNameTextStyle

Usage Example

import React, { useEffect } from "react";
import { View } from "react-native";
import {
STYLES,
LMUserProfileSection,
CreatePost
} from "@likeminds.community/feed-rn-core";

const CustomCreatePostScreen = () => {
// to customise ui
useEffect(() => {
STYLES.setPostListStyles({
header: {
profilePicture: {
size: 10,
fallbackTextBoxStyle: {
backgroundColor: "pink",
},
},
},
});
}, []);

return (
<CreatePost>
<LMUserProfileSection />
</CreatePost>
);
};

export default CustomCreatePostScreen;