# react-chat-comp

> Easy integration react chat component

Latest version **1.0.1** (published 2022-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-chat-comp
pnpm add react-chat-comp
yarn add react-chat-comp
bun add react-chat-comp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-12-06 |
| First published | 2022-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 67.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Burak Batuhan Erol |
| Maintainers | burakerol |
| Keywords | react-chat-component, react-chat, chat, react-admin-chat, admin-chat |

## Links

- npm: https://www.npmjs.com/package/react-chat-comp
- Repository: https://github.com/BurakBatuhan/react-chat-component
- Homepage: https://github.com/BurakBatuhan/react-chat-component#readme
- Issues: https://github.com/BurakBatuhan/react-chat-component/issues
- npm.io page: https://npm.io/package/react-chat-comp

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^18.2.0
- [moment](https://npm.io/package/moment.md) ^2.29.4
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [react-infinite-scroll-component](https://npm.io/package/react-infinite-scroll-component.md) ^6.1.0

## Recent versions

- 1.0.1 (latest) — 2022-12-06
- 1.0.0 — 2022-12-06

## README

# @React-chat-comp


react-chat-admin, easy integration and  beatiful custom component

- Enter the required props 
- You can custom the message box 
- You can see which users seen for each message  
- ✨Magic ✨


## Installion

 ` npm i react-chat-comp  ` or ` yarn i react-chat-comp`

## Css Initial 
` import 'react-chat-comp/chat.css' `
## Required Props 

| Name | Type  | Description |Example 
| ---- | --- | -------- | ----------- |
| ownerId | String  | The owner alwasy right on conversation | "634eb74f9141ae"
| conversationList |Array | Conversation List,  you can pick conversation from list | Please look at the down for a details 
| conversationContents | Array | In the conversation messages | Please look at the down for a details 
| totalContents | String |Total comments count  | "50"
| totalConversationList |  String   |Total conversation list count | "50"
| handleGetUserConversation | Function | when you click user from `converastionList` you need to get request for  `conversationContents`  | (id) => getConversationContents(id)

## Optional Props 

| Name | Type  | Description |Example 
| ---- | --- | -------- | ----------- |
| wallpaper | String  | In the chat conversation background image , you can use local file or link  |  "test.jpg"
| height | String  | Set your chat height the default was 400px   |  "200px"
| disableContextMenu |Boolean | Right-clicking on the message shows users who saw the message  |  false or true  
| disableProfileDetailButton | Boolean | You can see the users's information  | false or true 
| disableProfileHeader |  Boolean   |You can see the users's information on chat header | false or true 
|conversationHeaderStyle | Object | You can customize header with Inline Styling | {background: "red",borderRadius: "20px"}
|icons | Object | You can customize icons Note: You can use local images or link  | {profileIcon: "test.jpg",seenIcon: "", informationIcon: InfoIcon}
|rightBoxColors | Object | You can customize right box colors | {boxColor:"#09C4FF",stickColor: "white",textColor: "white",captionColor: "grey",}
|leftBoxColors | Object | You can customize right box colors | {boxColor:"#09C4FF",stickColor: "white",textColor: "white",captionColor: "grey",}
## conversationList - Example

    _id: "6335aefed6fecd3d0b398285",
    users: [
      {
        _id: "6375f174918fc73f14844eb9",
        username: "Jonathan", 
        status: "online",
        profileImage: "https://test.jpg",
      },
      {
        _id: "631af63eb6ddad746391ba26",
        username: "Sam",
        status: "offline",
        profileImage: "https://test.jpg",
        oldMember: false,
      },
    ],
    type: "SINGLE",
    lastMessage: {
      _id: "633aeaf7b15f97144ae7ddab",
      conversation: "6335aefed6fecd3d0b398285",
      type: "TEXT", // Other types "IMAGE", "VIDEO", "AUDIO"
      content: "On the conversation list shown last message",
      caption: "",
      createdAt: "2022-10-03T14:00:23.827Z",
      isDeleted: [],
      seen: false,
      sender: "631af63eb6ddad746391ba26",
      info: null,
    },
    lastMessageCreatedAt: "2022-10-03T14:00:23Z",
    unSeenCount: 0,
## conversationContents - Example 
> Note:  users information coming from conversationList

    _id: "634eb74f96d47e3632940a7e",
    conversation: "633d84fdd6fecd3d0b39843d",
    sender: "633bf525da193fe0f16db864",
    content: "Test Message",
    type: "TEXT",
    caption: "", 
    createdAt: "2022-10-18T14:25:19.967744681Z",
    isDeleted: false,
    isSeen: [],
    reply: {
      _id: "6343baf44129f4aa2386a857",
      content:"https://test.jpg",
      caption: "Test Caption message",
      type: "IMAGE",
      sender: "632b5ddf8720eddc024edd49",
    },



## License

MIT

---
_Source: https://npm.io/package/react-chat-comp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
