Skip to main content

Chat Button

Overview

LMChatButton serves as a UI component designed for the purpose of rendering various buttons, including Attachment buttons, Send button, Mic button, and other input buttons within a chat interface.

GitHub File

LMFeedMediaPreviewScreen

Customisation/Props

The LMChatButton component requires certain props, some of which are mandatory, while others are optional. Here is a breakdown of the available props along with their types:

ParameterTypeDescriptionOptional
textLMChatTextViewPropsRepresents the text displayed on the button✔️
iconLMChatIconPropsRepresents the icon displayed on the button✔️
onTap(value?: any) => voidRepresents the functionality on click of the button
placement"start" | "end"Represents the placement of the icon on the button✔️
isActivebooleanRepresents the active/inactive state of the button✔️
activeIconLMChatIconPropsIcon displayed when the button is in an active state✔️
activeTextLMCLMChatTextViewPropshatTextViewPropsText displayed when the button is in an active state✔️
buttonStyleViewStyleRepresents the style of the button✔️
isClickablebooleanIndicates if the button is disabled or not✔️

Usage Example

<LMChatButton
placement="end"
text={{
children: "example text",
}}
buttonStyle={{
borderRadius: 10,
elevation: 6,
}}
icon={{
assetPath: require("../../assets/images/AIChatBot.png"),
iconStyle: {
height: Layout.normalize(30),
width: Layout.normalize(30),
},
}}
/>