Skip to content

Commit 408aeb4

Browse files
committed
🐛 (theme) Fix containers disabled bg should be transparent
1 parent 8fe856a commit 408aeb4

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

packages/embeds/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/js",
3-
"version": "0.2.66",
3+
"version": "0.2.67",
44
"description": "Javascript library to display typebots on your website",
55
"type": "module",
66
"main": "dist/index.js",

packages/embeds/js/src/utils/setCssVariablesValue.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ const setHostBubbles = (
325325

326326
documentStyle.setProperty(
327327
cssVariableNames.chat.hostBubbles.opacity,
328-
isDefined(hostBubbles?.opacity)
328+
hostBubbles?.backgroundColor === 'transparent'
329+
? '0'
330+
: isDefined(hostBubbles?.opacity)
329331
? hostBubbles.opacity.toString()
330332
: defaultOpacity.toString()
331333
)
@@ -397,7 +399,9 @@ const setGuestBubbles = (
397399

398400
documentStyle.setProperty(
399401
cssVariableNames.chat.guestBubbles.opacity,
400-
isDefined(guestBubbles?.opacity)
402+
guestBubbles?.backgroundColor === 'transparent'
403+
? '0'
404+
: isDefined(guestBubbles?.opacity)
401405
? guestBubbles.opacity.toString()
402406
: defaultOpacity.toString()
403407
)
@@ -471,7 +475,9 @@ const setButtons = (
471475

472476
documentStyle.setProperty(
473477
cssVariableNames.chat.buttons.opacity,
474-
isDefined(buttons?.opacity)
478+
buttons?.backgroundColor === 'transparent'
479+
? '0'
480+
: isDefined(buttons?.opacity)
475481
? buttons.opacity.toString()
476482
: defaultOpacity.toString()
477483
)
@@ -530,7 +536,9 @@ const setInputs = (
530536

531537
documentStyle.setProperty(
532538
cssVariableNames.chat.inputs.opacity,
533-
isDefined(inputs?.opacity)
539+
inputs?.backgroundColor === 'transparent'
540+
? '0'
541+
: isDefined(inputs?.opacity)
534542
? inputs.opacity.toString()
535543
: defaultOpacity.toString()
536544
)

packages/embeds/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/nextjs",
3-
"version": "0.2.66",
3+
"version": "0.2.67",
44
"description": "Convenient library to display typebots on your Next.js website",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/embeds/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/react",
3-
"version": "0.2.66",
3+
"version": "0.2.67",
44
"description": "Convenient library to display typebots on your React app",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)