@royaltics/chat-react-sails
v0.1.2
Published
A Widget for reactjs and sailsjs server
Downloads
2
Maintainers
Readme
@royaltics/chat-react-sails
A Button react.js for payphone checkout
Install
npm install --save @royaltics/chat-react-sails
Usage
import React from 'react'
import ChatBoxComponent from '@royaltics/chat-react-sails'
import '@royaltics/chat-react-sails/dist/index.css'
const App = () => {
return <ChatBoxComponent
title="Royaltics Solutions"
agentName="asdasdas"
agentStatus="asdasdasd"
agentPhoto="https://cdn-icons-png.flaticon.com/512/29/29508.png"
style={
{
primaryColor: 'green'
}
}
optionsApi={
{
host: 'http://localhost:1338',
authorization: '',
pathConnet: '/widget/chat-messaging/connect',
pathSubscribe: '/widget/chat-messaging/subscribe',
pathGetMessages: '/widget/chat-messaging/messages/all/',//+:room_id
pathSendMessages: '/widget/chat-messaging/messages/', //+:room_id
}
}
optionsFiles={{
nodeElement: document.getElementById("root"),
onCapture: (blob: any) => {
console.log(blob, "///////")
},
onError: (err: any) => console.log(err)
}}
btnTitle="XXXX"
channel_uuid="a24a6ea4-ce75-4665-a070-57453082c256"
/>
}
export default App
License
MIT © royaltics-solutions