Embed Chat configuration updated (#2648)

pull/2682/head
Aman Soni 2024-06-20 01:42:41 +05:30 committed by GitHub
parent b662dd79c6
commit 8bb841641e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 0 deletions

View File

@ -104,6 +104,24 @@ const buttonConfig = (isReact = false) => {
}`
}
const tooltipConfig = (isReact = false) => {
return isReact
? `tooltip: {
showTooltip: true,
tooltipMessage: 'Hi There 👋!',
tooltipBackgroundColor: 'black',
tooltipTextColor: 'white',
tooltipFontSize: 16,
}`
: `tooltip: {
showTooltip: true,
tooltipMessage: 'Hi There 👋!',
tooltipBackgroundColor: 'black',
tooltipTextColor: 'white',
tooltipFontSize: 16,
}`
}
const chatwindowConfig = (isReact = false) => {
return isReact
? `chatWindow: {
@ -136,6 +154,7 @@ const chatwindowConfig = (isReact = false) => {
sendButtonColor: '#3B81F6',
maxChars: 50,
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
autoFocus: true, // If not used, autofocus is disabled on mobile and enabled on desktop. true enables it on both, false disables it on both.
},
feedback: {
color: '#303235',
@ -177,6 +196,7 @@ const chatwindowConfig = (isReact = false) => {
sendButtonColor: '#3B81F6',
maxChars: 50,
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
autoFocus: true, // If not used, autofocus is disabled on mobile and enabled on desktop. true enables it on both, false disables it on both.
},
feedback: {
color: '#303235',
@ -201,6 +221,7 @@ const embedPopupHtmlCodeCustomization = (chatflowid) => {
},
theme: {
${buttonConfig()},
${tooltipConfig()},
${chatwindowConfig()}
}
})
@ -217,6 +238,7 @@ const App = () => {
apiHost="${baseURL}"
theme={{
${buttonConfig(true)},
${tooltipConfig(true)},
${chatwindowConfig(true)}
}}
/>