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:
Styling Customisations
Prop | Type | Description |
---|---|---|
postHeaderStyle | object | Custom styles for the post header. |
userNameTextStyle | TextStyle | Custom 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;
- Use the
LMUserProfileSection
or your own custom component with all other create post components as a child of theCreatePost
component in the relevant screens: