Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-spartez-support-chat-widget with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. var reactSpartezSupportChatWidget = require("react-spartez-support-chat-widget")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-spartez-support-chat-widget v0.0.4

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

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
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free