2
0

🚑 Add back runtimeOptions and fix popup width option

This commit is contained in:
Baptiste Arnaud
2023-12-22 10:24:33 +01:00
parent 1e5fa5a575
commit 867e68c4d9
8 changed files with 300 additions and 196 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.2.30",
"version": "0.2.31",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@@ -126,12 +126,13 @@ export const Popup = (props: PopupProps) => {
<div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0">
<div
class={
'relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 sm:w-full sm:max-w-lg' +
'relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 w-full max-w-lg' +
(props.theme?.backgroundColor ? ' shadow-xl' : '')
}
style={{
'background-color':
props.theme?.backgroundColor ?? 'transparent',
'max-width': props.theme?.width ?? '512px',
}}
on:pointerdown={stopPropagation}
>

View File

@@ -105,6 +105,7 @@ export async function startChatQuery({
isStreamEnabled: true,
prefilledVariables,
resultId,
isOnlyRegistering: false,
} satisfies Omit<StartChatInput, 'publicId'>,
timeout: false,
}

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.2.30",
"version": "0.2.31",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.2.30",
"version": "0.2.31",
"description": "Convenient library to display typebots on your React app",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -11,6 +11,9 @@ export const Default = () => {
typebot={leadGenerationTypebot}
apiHost="http://localhost:3001"
autoShowDelay={3000}
theme={{
width: '800px',
}}
isPreview
/>
</>