Skip to main content

LMCreatePostHeading

The LMCreatePostHeading component is responsible for the heading section of the post creation screen. It allows users to input a heading for the post, displaying a character count and providing conditional rendering based on the isHeadingEnabled context.

LMFeedPostContent

Overview

LMCreatePostHeading provides the following functionality:

  • Displays an input field for the post heading with a character limit.
  • Shows a separator line and character counter.
  • Supports dark/light theme modes.
  • The heading input section is conditionally rendered based on the isHeadingEnabled context.

Props

The component supports callback and properties through context values, which are configured within the CreatePost component.

PropertyTypeDescription
isHeadingEnabledbooleanDetermines if the heading input section and related UI elements are shown.

Example Usage

To use this component, make sure the CreatePostContext and CreatePostCustomisableMethodsContext are properly set up in the parent component.

import React from "react";
import { View } from "react-native";
import { LMCreatePostHeading } from "@likeminds.community/feed-rn-core";

const CreatePostScreen = () => {
return (
<View style={{ flex: 1 }}>
<LMCreatePostHeading />
</View>
);
};

export default CreatePostScreen;