Skip to main content

LMCreatePostTopics

LMCreatePostTopics allows users to view and select topics for their post. The component dynamically updates based on the context values and selected topics from Redux state. It also integrates with an external API to fetch topics when necessary.

  • Displays selected topics with custom styles.
  • Allows navigation to a topic feed to explore additional topics.
  • Fetches and filters topics based on their availability and enablement state.
  • Supports conditional rendering based on whether predefined topics exist and the visibility settings defined in context.
LMFeedPostContent

Customization Options

The component supports the following customization through context, these values need to be passed through CreatePost component.

PropertyTypeDescription
hideTopicsViewCreatebooleanFlag to hide the topics view when creating a post.
hideTopicsViewEditbooleanFlag to hide the topics view when editing a post.

Customisations with Styles

PropTypeDescription
selectTopicPlaceholderstringPlaceholder text for the "Select Topics" button.
selectedTopicsStyleViewStyleCustom styles for the displayed selected topics.
plusIconStyleImageStyleCustom style for the "+" icon used to add new topics.

To see all the properties, visit TopicsStyle

Usage Example

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

const CreatePostScreen = () => {
// to customise ui
useEffect(() => {
STYLES.setTopicsStyles({
selectedTopicsStyle: {
color: "red",
},
});
}, []);

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

export default CreatePostScreen;