2
0

(chat) Improve chat API compatibility with preview mode

This commit is contained in:
Baptiste Arnaud
2023-01-16 12:13:21 +01:00
parent dbe5c3cdb1
commit 7311988901
55 changed files with 4133 additions and 465 deletions

View File

@ -32,7 +32,7 @@ export const Default = () => {
</div>
<Bubble
typebotId="ladleTypebot"
typebot="ladleTypebot"
apiHost="http://localhost:3001"
prefilledVariables={{
Name: 'John',
@ -42,12 +42,15 @@ export const Default = () => {
message: 'Hello, I am a preview message',
autoShowDelay: 3000,
}}
button={{
backgroundColor: '#FF7537',
icon: {
color: 'white',
theme={{
button: {
backgroundColor: '#FF7537',
icon: {
color: 'white',
},
},
}}
isPreview
/>
</div>
)

View File

@ -7,9 +7,10 @@ export const Default = () => {
<button onClick={open}>Open modal</button>
<button onClick={toggle}>Toggle modal</button>
<Popup
typebotId="ladleTypebot"
typebot="clctayswj000l3b6y2vkh8kwg"
apiHost="http://localhost:3001"
autoShowDelay={3000}
isPreview
/>
</>
)

View File

@ -3,7 +3,11 @@ import { Standard } from '..'
export const Default = () => {
return (
<div style={{ height: '500px' }}>
<Standard typebotId="ladleTypebot" apiHost="http://localhost:3001" />
<Standard
typebot="ladleTypebot"
apiHost="http://localhost:3001"
isPreview
/>
</div>
)
}