Skip to content

Commit

Permalink
🐛 (theme) Fix containers disabled bg should be transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 11, 2024
1 parent 8fe856a commit 408aeb4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/embeds/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.2.66",
"version": "0.2.67",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",
Expand Down
16 changes: 12 additions & 4 deletions packages/embeds/js/src/utils/setCssVariablesValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ const setHostBubbles = (

documentStyle.setProperty(
cssVariableNames.chat.hostBubbles.opacity,
isDefined(hostBubbles?.opacity)
hostBubbles?.backgroundColor === 'transparent'
? '0'
: isDefined(hostBubbles?.opacity)
? hostBubbles.opacity.toString()
: defaultOpacity.toString()
)
Expand Down Expand Up @@ -397,7 +399,9 @@ const setGuestBubbles = (

documentStyle.setProperty(
cssVariableNames.chat.guestBubbles.opacity,
isDefined(guestBubbles?.opacity)
guestBubbles?.backgroundColor === 'transparent'
? '0'
: isDefined(guestBubbles?.opacity)
? guestBubbles.opacity.toString()
: defaultOpacity.toString()
)
Expand Down Expand Up @@ -471,7 +475,9 @@ const setButtons = (

documentStyle.setProperty(
cssVariableNames.chat.buttons.opacity,
isDefined(buttons?.opacity)
buttons?.backgroundColor === 'transparent'
? '0'
: isDefined(buttons?.opacity)
? buttons.opacity.toString()
: defaultOpacity.toString()
)
Expand Down Expand Up @@ -530,7 +536,9 @@ const setInputs = (

documentStyle.setProperty(
cssVariableNames.chat.inputs.opacity,
isDefined(inputs?.opacity)
inputs?.backgroundColor === 'transparent'
? '0'
: isDefined(inputs?.opacity)
? inputs.opacity.toString()
: defaultOpacity.toString()
)
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.2.66",
"version": "0.2.67",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.2.66",
"version": "0.2.67",
"description": "Convenient library to display typebots on your React app",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 408aeb4

Please sign in to comment.