Skip to content

Commit

Permalink
馃悰 Fix input background not properly set
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 17, 2024
1 parent 7e3e05f commit 94539e8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const UploadButton = ({
id="file-input"
display="none"
onChange={handleInputChange}
accept={fileType === 'image' ? '.jpg, .jpeg, .png, .gif' : '.mp3, .wav'}
accept={fileType === 'image' ? 'image/*' : 'audio/*'}
/>
<Button
as="label"
Expand Down
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.74",
"version": "0.2.75",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",
Expand Down
19 changes: 11 additions & 8 deletions packages/embeds/js/src/utils/setCssVariablesValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ const setHostBubbles = (

documentStyle.setProperty(
cssVariableNames.chat.hostBubbles.blur,
isDefined(hostBubbles?.blur)
? `${hostBubbles.blur ?? 0}px`
: defaultBlur.toString()
isDefined(hostBubbles?.blur) ? `${hostBubbles.blur ?? 0}px` : 'none'
)

setShadow(
Expand Down Expand Up @@ -408,9 +406,7 @@ const setGuestBubbles = (

documentStyle.setProperty(
cssVariableNames.chat.guestBubbles.blur,
isDefined(guestBubbles?.blur)
? `${guestBubbles.blur ?? 0}px`
: defaultBlur.toString()
isDefined(guestBubbles?.blur) ? `${guestBubbles.blur ?? 0}px` : 'none'
)

setShadow(
Expand Down Expand Up @@ -484,7 +480,7 @@ const setButtons = (

documentStyle.setProperty(
cssVariableNames.chat.buttons.blur,
isDefined(buttons?.blur) ? `${buttons.blur ?? 0}px` : defaultBlur.toString()
isDefined(buttons?.blur) ? `${buttons.blur ?? 0}px` : 'none'
)

setShadow(
Expand Down Expand Up @@ -537,6 +533,13 @@ const setInputs = (

documentStyle.setProperty(
cssVariableNames.chat.inputs.borderOpacity,
isDefined(inputs?.border?.opacity)
? inputs.border.opacity.toString()
: defaultOpacity.toString()
)

documentStyle.setProperty(
cssVariableNames.chat.inputs.opacity,
inputs?.backgroundColor === 'transparent'
? '0'
: isDefined(inputs?.opacity)
Expand All @@ -546,7 +549,7 @@ const setInputs = (

documentStyle.setProperty(
cssVariableNames.chat.inputs.blur,
isDefined(inputs?.blur) ? `${inputs.blur ?? 0}px` : defaultBlur.toString()
isDefined(inputs?.blur) ? `${inputs.blur ?? 0}px` : 'none'
)

setShadow(
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.74",
"version": "0.2.75",
"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.74",
"version": "0.2.75",
"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 94539e8

Please sign in to comment.