@royaltics/chat-react-sails
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@royaltics/chat-react-sails

A Button react.js for payphone checkout

NPM JavaScript Style Guide

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

Package Sidebar

Install

npm i @royaltics/chat-react-sails

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

201 kB

Total Files

22

Last publish

Collaborators

  • royaltics.solutions