react-spartez-support-chat-widget

A React component for embedding Spartez 'Chat for Jira Service Desk' widget on your own webapp

Usage no npm install needed!

<script type="module">
  import reactSpartezSupportChatWidget from 'https://cdn.skypack.dev/react-spartez-support-chat-widget';
</script>

README

Support Chat Widget

Support Chat Widget is a ReactJS component allowing easy integration of your React webapp with Chat for Service Desk.

Install

  • npm: npm install react-spartez-support-chat-widget

Your package.json must look like this

{
    "dependencies": {
        "react": "^16.6.0",
        "react-dom": "^16.6.0",
        "react-scripts": "2.0.5",
        "react-spartez-support-chat-widget": "^0.0.4"
    }
}

Usage (jsx)

import React from 'react';
import SupportChatWidget from 'react-spartez-support-chat-widget'
.
.
.
<SupportChatWidget
    url={'http://localhost:8080'}
    portal={1}
    // delay={100} // delay between page load and chat load in milliseconds
    // container={'spartez-support-chat-container'} // ID of the page element that will be replaced by chat
    // iconClass={'spartez-support-chat-container-icon'} // additional class added to the chat icon
    // chatClass={'spartez-support-chat-container-chat'} // additional class added to the chat widget
/>
.
.
.

Development

  • npm install
  • npm run start (so webpack can watch the files and build on every change)
  • npm link
  • in your wepapp package.json directory: npm link react-spartez-support-chat-widget

Publishing

  • npm run build
  • npm publish