feat: Allow user to change the bubble title using SDK (#1155)

- Allow user to change the bubble title using SDK
- Add docs for enabling expanded bubble
This commit is contained in:
Pranav Raj S 2020-08-19 22:24:02 +05:30 committed by GitHub
parent 662bb882f7
commit e8912655a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -13,6 +13,7 @@ const runSDK = ({ baseUrl, websiteToken }) => {
websiteToken,
locale: chatwootSettings.locale,
type: getBubbleView(chatwootSettings.type),
launcherTitle: window.chatwootSettings.launcherTitle || '',
toggle() {
IFrameHelper.events.toggleBubble();

View file

@ -113,7 +113,7 @@ export const IFrameHelper = {
},
setBubbleLabel(message) {
setBubbleText(message.label);
setBubbleText(window.$chatwoot.launcherTitle || message.label);
},
toggleBubble: () => {

View file

@ -37,6 +37,15 @@ Chatwoot support 2 designs for for the widget
![Expanded-bubble](./images/sdk/expanded-bubble.gif)
If you are using expanded bubble, you can customize the text used in the bubble by setting `launcherText` parameter on chatwootSettings as described below.
```js
window.chatwootSettings = {
type: 'expanded_bubble',
launcherText: 'Chat with us'
}
```
### To trigger widget without displaying bubble
```js