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

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:
Parameter | Type | Description | Optional |
---|---|---|---|
text | LMChatTextViewProps | Represents the text displayed on the button | ✔️ |
icon | LMChatIconProps | Represents the icon displayed on the button | ✔️ |
onTap | (value?: any) => void | Represents the functionality on click of the button | |
placement | "start" | "end" | Represents the placement of the icon on the button | ✔️ |
isActive | boolean | Represents the active/inactive state of the button | ✔️ |
activeIcon | LMChatIconProps | Icon displayed when the button is in an active state | ✔️ |
activeText | LMCLMChatTextViewPropshatTextViewProps | Text displayed when the button is in an active state | ✔️ |
buttonStyle | ViewStyle | Represents the style of the button | ✔️ |
isClickable | boolean | Indicates 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),
},
}}
/>