forked from teeso/Chatbot-Widget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (26 loc) · 840 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react';
import ReactDOM from 'react-dom';
import { ArticulateChatbotWidget } from './index_for_react_app';
const plugin = {
init: (args) => {
ReactDOM.render(
<ArticulateChatbotWidget
name={args.name}
articulateHost={args.articulateHost}
articulatePort={args.articulatePort}
articulateWSPort={args.articulateWSPort}
connectionId={args.connectionId}
botAvatarURL={args.botAvatarURL}
userAvatarURL={args.userAvatarURL}
clearItemMenuLabel={args.clearItemMenuLabel}
restartItemMenuLabel={args.restartItemMenuLabel}
closeItemMenuLabel={args.closeItemMenuLabel}
inputPlaceholder={args.inputPlaceholder}
/>, document.querySelector(args.selector)
);
}
};
export {
plugin as default,
ArticulateChatbotWidget
};