Chat Icon
Overview
LMChatIcon serves as a UI component designed for the purpose of rendering icons, including group icon, user icon and other icons within a chat interface.
GitHub File
Customisation/Props
The LMChatIcon 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 |
|---|---|---|---|
| iconUrl | string | Represents the URL of the icon | ✔️ |
| assetPath | object | Represents the path of the local image | ✔️ |
| color | string | Represents the tint color of the icon | ✔️ |
| height | number | Represents the height of the icon | ✔️ |
| width | number | Represents the width of the icon | ✔️ |
| iconStyle | ImageStyle | Represents the style of the icon | ✔️ |
| boxFit | "center" | "contain" | "cover" | "repeat" | "stretch" | Defines the fit behavior of the icon inside the box | ✔️ |
| boxStyle | ViewStyle | Represents the style of the view | ✔️ |
Usage Example
<LMChatIcon
assetPath={require('../../assets/images/chatActive.png')}
iconStyle={
height: 25,
width: 25,
backgroundColor: 'black'
}
/>