Simple Chat Widget
Widget to display chat between attendees.
Simple Chat Widget config
** apiBaseUrl = base url for API
** streamApiKey = getstream.io API key
** forumSlug = getstream.io forum slug
accessToken = user access token
onAuthError(err, res) = method called upon api 401 or 403 error
openDir = direction to where the chat opens, right or left, default left
title = widget title
showHelp = shows Help channel, default false
showQA = shows QA channel, default false
hideUsers = hides the User list, default false
$3
``
jsx
const WidgetContainer = () => {
const childRef = useRef();
const startOneToOneChat = () => {
childRef.current.startOneToOneChat('PARTNER USER ID')
}
return (
)
}
``
PUBLISH TO NPM:
1. npm version patch / npm version minor / npm version major
2. npm run publish-package
IMPORT:
import SimpleChatWidget from 'simple-chat-widget';
import 'simple-chat-widget/index.css';