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.

LMFeedPostContent

Customisations with Styles

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,
} from "@likeminds.community/feed-rn-core";

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

return (
<View style={{ flex: 1 }}>
<LMUserProfileSection />
</View>
);
};

export default CreatePostScreen;