Skip to main content

LMCreatePostTextInput

The LMCreatePostTextInput component renders a customizable text input field where users can enter the content of their posts.

It also utilizes the LMInputText component for input rendering and allows for custom styling of the input field. The placeholder text, input style, and other settings are configurable based on the current theme and the provided STYLES.

LMFeedPostContent

Customisations with Styles

PropTypeDescription
placeholderTextstringCustom placeholder text for the input field.
placeholderTextColorstringThe color of the placeholder text.
inputTextStyleViewStyleCustom styles for the input text.
multilineFieldbooleanIf true, the input field supports multiple lines. Defaults to true.
textValueStyleTextStyleStyles for the input text value.

To see all the properties, visit CreatePostStyleProps.createPostTextInputStyle


Usage Example

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

const CreatePostScreen = () => {
// to customise ui
useEffect(() => {
STYLES.setCreatePostStyles({
createPostTextInputStyle: {
placeholderText: "Create a post",
placeholderTextColor: "pink",
},
});
}, []);
return (
<View style={{ flex: 1 }}>
<LMCreatePostTextInput />
</View>
);
};

export default CreatePostScreen;