From 023a6f274a8b8e07e33fe3cec864e923b48e11ec Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 29 Mar 2022 11:55:10 +0200 Subject: [PATCH] =?UTF-8?q?feat(engine):=20=E2=99=BF=EF=B8=8F=20Add=20data?= =?UTF-8?q?-block-name=20prop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx | 4 +++- packages/bot-engine/src/components/ConversationContainer.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx b/packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx index 91463062433..301746053e6 100644 --- a/packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx +++ b/packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx @@ -24,6 +24,7 @@ import { getLastChatStepType } from '../../services/chat' type ChatBlockProps = { steps: Step[] startStepIndex: number + blockTitle: string onScroll: () => void onBlockEnd: ( edgeId?: string, @@ -36,6 +37,7 @@ type ChatDisplayChunk = { bubbles: BubbleStep[]; input?: InputStep } export const ChatBlock = ({ steps, startStepIndex, + blockTitle, onScroll, onBlockEnd, }: ChatBlockProps) => { @@ -167,7 +169,7 @@ export const ChatBlock = ({ const avatarSrc = typebot.theme.chat.hostAvatar?.url return ( -
+
{displayedChunks.map((chunk, idx) => ( ))} {/* We use a block to simulate padding because it makes iOS scroll flicker */}