Skip to content

Commit 342271e

Browse files
committed
docs: Update custom options example
1 parent a96d7df commit 342271e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/examples/custom_options.md

+4
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ const MyChatBot = () => {
1616

1717
// setup your own bot options state
1818
const [botOptions, setBotOptions] = React.useState({
19+
// includes the default values in bot options before overriding
1920
...defaultBotOptions,
2021
theme: {
22+
// includes the default values for each section before overriding
2123
...defaultBotOptions.theme,
2224
embedded: true
2325
},
2426
chatHistory: {
27+
...defaultBotOptions.chatHistory,
2528
storageKey: "example_custom_options"
2629
},
2730
// remember to enable custom bot options under the advance section
2831
advance: {
32+
...defaultBotOptions.advance,
2933
useCustomBotOptions: true
3034
}
3135
});

0 commit comments

Comments
 (0)