diff --git a/apps/builder/src/features/publish/components/embeds/modals/IframeModal/IframeSnippet.tsx b/apps/builder/src/features/publish/components/embeds/modals/IframeModal/IframeSnippet.tsx
index 569956037..f6d90021b 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/IframeModal/IframeSnippet.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/IframeModal/IframeSnippet.tsx
@@ -15,7 +15,7 @@ export const IframeSnippet = ({ widthLabel, heightLabel }: Props) => {
const { typebot } = useTypebot()
const src = `${env.NEXT_PUBLIC_VIEWER_URL[0]}/${typebot?.publicId}`
const code = prettier.format(
- ``,
+ ``,
{ parser: 'html', plugins: [parserHtml] }
)
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Javascript/instructions/JavascriptBubbleInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/Javascript/instructions/JavascriptBubbleInstructions.tsx
index 97cd8f382..f9f2fc465 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Javascript/instructions/JavascriptBubbleInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Javascript/instructions/JavascriptBubbleInstructions.tsx
@@ -5,10 +5,13 @@ import { Typebot } from '@typebot.io/schemas'
import { useState } from 'react'
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
import { JavascriptBubbleSnippet } from '../JavascriptBubbleSnippet'
+import { defaultTheme } from '@typebot.io/schemas/features/typebot/theme/constants'
export const parseDefaultBubbleTheme = (typebot?: Typebot) => ({
button: {
- backgroundColor: typebot?.theme.chat?.buttons?.backgroundColor,
+ backgroundColor:
+ typebot?.theme.chat?.buttons?.backgroundColor ??
+ defaultTheme.chat.buttons.backgroundColor,
},
})
diff --git a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
index cb0fada7f..9ecfc1ee2 100644
--- a/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
+++ b/apps/builder/src/features/publish/components/embeds/modals/Script/instructions/ScriptBubbleInstructions.tsx
@@ -2,7 +2,6 @@ import { CodeEditor } from '@/components/inputs/CodeEditor'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { Stack, Text } from '@chakra-ui/react'
import { BubbleProps } from '@typebot.io/nextjs'
-import { Typebot } from '@typebot.io/schemas'
import { useState } from 'react'
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
import {
@@ -11,16 +10,7 @@ import {
typebotImportCode,
parseApiHostValue,
} from '../../../snippetParsers'
-
-export const parseDefaultBubbleTheme = (typebot?: Typebot) => ({
- button: {
- backgroundColor: typebot?.theme.chat?.buttons?.backgroundColor,
- iconColor: typebot?.theme.chat?.buttons?.color,
- },
- previewMessage: {
- backgroundColor: typebot?.theme.general?.background?.content,
- },
-})
+import { parseDefaultBubbleTheme } from '../../Javascript/instructions/JavascriptBubbleInstructions'
export const ScriptBubbleInstructions = () => {
const { typebot } = useTypebot()