From c75148c800487b74dd77c7e67c8f5aea199432f5 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 23 Apr 2024 11:27:02 +0200 Subject: [PATCH] :bug: (bot) Fix svg images not being displayed Closes #1456 --- packages/embeds/js/package.json | 2 +- .../features/blocks/bubbles/image/components/ImageBubble.tsx | 3 ++- packages/embeds/nextjs/package.json | 2 +- packages/embeds/react/package.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json index cf424dcafe..6061cbb407 100644 --- a/packages/embeds/js/package.json +++ b/packages/embeds/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.2.76", + "version": "0.2.77", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/embeds/js/src/features/blocks/bubbles/image/components/ImageBubble.tsx b/packages/embeds/js/src/features/blocks/bubbles/image/components/ImageBubble.tsx index a1252bd3c6..43361c83bc 100644 --- a/packages/embeds/js/src/features/blocks/bubbles/image/components/ImageBubble.tsx +++ b/packages/embeds/js/src/features/blocks/bubbles/image/components/ImageBubble.tsx @@ -53,7 +53,8 @@ export const ImageBubble = (props: Props) => { } class={clsx( isTyping() ? 'opacity-0' : 'opacity-100', - props.onTransitionEnd ? 'text-fade-in' : undefined + props.onTransitionEnd ? 'text-fade-in' : undefined, + props.content?.url?.endsWith('.svg') ? 'w-full' : undefined )} style={{ 'max-height': '512px', diff --git a/packages/embeds/nextjs/package.json b/packages/embeds/nextjs/package.json index 669c33a6ca..d96555da52 100644 --- a/packages/embeds/nextjs/package.json +++ b/packages/embeds/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/nextjs", - "version": "0.2.76", + "version": "0.2.77", "description": "Convenient library to display typebots on your Next.js website", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/embeds/react/package.json b/packages/embeds/react/package.json index 939b7d8dcc..47deb172a8 100644 --- a/packages/embeds/react/package.json +++ b/packages/embeds/react/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/react", - "version": "0.2.76", + "version": "0.2.77", "description": "Convenient library to display typebots on your React app", "main": "dist/index.js", "types": "dist/index.d.ts",