Skip to content

Commit 905f384

Browse files
committed
docs: Update docs with new device settings
1 parent 7859b91 commit 905f384

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

docs/api/settings.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ const DefaultSettings: Settings = {
2525
showInputRow: true,
2626
actionDisabledIcon: actionDisabledIcon,
2727
embedded: false,
28-
desktopEnabled: true,
29-
mobileEnabled: true,
3028
flowStartTrigger: "ON_LOAD",
3129
},
3230
tooltip: {
@@ -207,6 +205,11 @@ const DefaultSettings: Settings = {
207205
sendButton: "send message",
208206
voiceButton: "toggle voice",
209207
inputTextArea: "input text area",
208+
},
209+
device: {
210+
desktopEnabled: true,
211+
mobileEnabled: true,
212+
applyMobileOptimizations: true,
210213
}
211214
}
212215
```
@@ -231,6 +234,7 @@ Below is a list of available sections along with a brief description for each of
231234
| chatWindow | `object` | Configuration for the chatbot window. |
232235
| chatHistory | `object` | Configuration for chatbot chat history. |
233236
| chatInput | `object` | Configuration for chatbot input. |
237+
| device | `object` | Configuration for chatbot behavior on different devices. |
234238
| emoji | `object` | Configuration for chatbot emojis. |
235239
| event | `object` | Configuration for chatbot events. |
236240
| fileAttachment | `object` | Configuration for chatbot file attachments. |
@@ -347,6 +351,16 @@ Properties here handle the chat input sent by the user. Note that when chatbot i
347351
| sendCheckboxOutput | `boolean` | true | Specifies whether to send user selection(s) as a message to the bot. |
348352
| buttons | `Array<string \| JSX.Element>` | [Button.VOICE_MESSAGE_BUTTON, Button.SEND_MESSAGE_BUTTON] | An ordered list of buttons to show in the chat input (supports both default buttons and custom components) - for the list of default buttons, import the `Button` constant from the library. |
349353

354+
### device
355+
356+
Properties here handle the chatbot behavior on different devices (e.g. desktop/mobile).
357+
358+
| Name | Type | Default | Description |
359+
| -------------------------- | ------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
360+
| desktopEnabled | `boolean` | true | Specifies whether the chatbot is enabled for users on desktop. |
361+
| mobileEnabled | `boolean` | true | Specifies whether the chatbot is enabled for users on mobile. |
362+
| applyMobileOptimizations | `boolean` | true | Specifies if optimizations should be applied on mobile (e.g. auto fullscreen for better viewing). This option is irrelevant if `mobileEnabled` is false. |
363+
350364
### emoji
351365

352366
Properties here handle the emoji picker. Note that this feature will be disabled if chat input is disabled.
@@ -419,8 +433,6 @@ Properties here handle general configurations for the chatbot.
419433
| showInputRow | `boolean` | true | Specifies whether the chat input row should be shown in the chat window. |
420434
| actionDisabledIcon | `string` | - | The cursor image to display when hovering over an action that is disabled. |
421435
| embedded | `boolean` | false | Specifies whether the chatbot is embedded in the webpage or accessed through a floating button. Note that notifications feature **will not work** for embedded chat windows. |
422-
| desktopEnabled | `boolean` | true | Specifies whether the chatbot is enabled for users on desktop. |
423-
| mobileEnabled | `boolean` | true | Specifies whether the chatbot is enabled for users on mobile. |
424436
| flowStartTrigger | `string` | "ON_LOAD" | The trigger for starting chatbot flow which includes: <ul><li>`ON_LOAD`:</li> Flow begins on chatbot load<li>`ON_CHATBOT_INTERACT`:</li> Flow begins when user interacts with chatbot<li>`ON_PAGE_INTERACT`:</li> Flow begins when user interacts with page</ul>
425437

426438
### header

docs/api/styles.md

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const DefaultStyles: Styles = {
7171
voiceIconDisabledStyle: {},
7272
sendIconStyle: {},
7373
sendIconDisabledStyle: {},
74+
sendIconHoveredStyle: {},
7475
rcbTypingIndicatorContainerStyle: {},
7576
rcbTypingIndicatorDotStyle: {},
7677
toastPromptContainerStyle: {},
@@ -147,6 +148,7 @@ If you wish to refine the appearance of the chatbot, these are the list of secti
147148
| voiceIconDisabledStyle | `object` | {} | Styles for the disabled voice icon. |
148149
| sendIconStyle | `object` | {} | Styles for the send icon. |
149150
| sendIconDisabledStyle | `object` | {} | Styles for the disabled send icon. |
151+
| sendIconHoveredStyle | `object` | {} | Styles for the hovered send icon. |
150152
| rcbTypingIndicatorContainerStyle | `object` | {} | Styles for the typing indicator container. |
151153
| rcbTypingIndicatorDotStyle | `object` | {} | Styles for the typing indicator dot. |
152154
| toastPromptContainerStyle | `object` | {} | Styles for the toast prompt container. |

src/components/FloatingChatBot/FloatingChatBot.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const FloatingChatBot = () => {
2323
const settings = {
2424
voice: {disabled: false},
2525
audio: {disabled: false},
26-
general: {
27-
mobileEnabled: true,
28-
},
2926
botBubble: {
3027
simStream: true
3128
},

0 commit comments

Comments
 (0)