1.0.32 • Published 4 years ago

simple-chat-widget v1.0.32

Weekly downloads
35
License
Apache-2.0
Repository
github
Last release
4 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

4 years ago

1.0.31

5 years ago

1.0.29

5 years ago

1.0.30

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago