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
.
Customisations with Styles
Prop | Type | Description |
---|---|---|
placeholderText | string | Custom placeholder text for the input field. |
placeholderTextColor | string | The color of the placeholder text. |
inputTextStyle | ViewStyle | Custom styles for the input text. |
multilineField | boolean | If true , the input field supports multiple lines. Defaults to true . |
textValueStyle | TextStyle | Styles 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;
- Use the
CreatePostScreen
component with all other create post components as a child of theCreatePost
component in the relevant screens: