1.0.32 • Published 3 years ago

simple-chat-widget v1.0.32

Weekly downloads
35
License
Apache-2.0
Repository
github
Last release
3 years ago

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

START A ONE TO ONE CHAT FROM OUTSIDE

const WidgetContainer = () => {
    const childRef = useRef();
    const startOneToOneChat = () => {
        childRef.current.startOneToOneChat('PARTNER USER ID')
    }
    
    return (
        <div style={{width: '350px', margin: '20px auto', backgroundColor: 'lightgray', height: 500}}>
            <SimpleChatWidget {...widgetProps} ref={childRef} />
            <button onClick={startOneToOneChat}>Start One To One Chat</button>
        </div>
    )
}

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';

1.0.32

3 years ago

1.0.31

3 years ago

1.0.29

4 years ago

1.0.30

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago