bk-chat
v2.0.1
Published
Bk chat, a custom chat module of **BookingKoala** company.
Downloads
19
Readme
Bk Chat module
Bk chat, a custom chat module of BookingKoala company.
Development
Run npm start
for a dev server. Navigate to http://localhost:3000/
. The app will automatically reload if you change any of the source files.
Node Version
Node version 18.16.0
development is done.
Socket Version
"socket.io-client": "^2.5.0"
development is done.
Installation
Install bk-chat module with npm
bash:
npm install bk-chat
Dependencies
Now your package.json
have
json
{
"dependencies": {
"bk-chat": "^1.0.1" // will be changed
},
}
Using module
Steps to use the module in the project
- Open the project terminal where to use the module and run
npm i bk-chat
, now the module has been added in the project.To verify, peek into node_modules folder and search for bk-chat.
bash:
npm install bk-chat
After completion of above process, now import it into file where you want to use chat module.
ts import Chat from 'bk-chat/dist/Chat';
In Hosting App.
Add the JSX element tag in the Hosting App that are given below.
Object
initData = {
enableMembers: "enableMembers is the boolean value true/false for showing teams tag",
imgBase: "imgBase is the database image url",
domainName: "domainName of the web url",
timeFormat: "it is the timeFormat of hosting app either 12/24 hours format",
baseUrl: "it is the baseUrl of the hosting app",
}
JSX Element
<Chat initData="It is an object that holds the data which is required for initializing the bk-chat module" callback='it is callback function used for downloading files which has action type as string and url of media file' />
Import css file into your styles file:
import '../../../node_modues/bk-chat/dist/bkchat.css'