diff --git a/components/bubble/Bubble.tsx b/components/bubble/Bubble.tsx index 1ef00ed6..102a0980 100644 --- a/components/bubble/Bubble.tsx +++ b/components/bubble/Bubble.tsx @@ -61,7 +61,7 @@ const Bubble: React.ForwardRefRenderFunction = (props, r const contextConfig = useXComponentConfig('bubble'); // ============================ Typing ============================ - const [typingEnabled, typingStep, typingInterval] = useTypingConfig(typing); + const [typingEnabled, typingStep, typingInterval, typingSuffix] = useTypingConfig(typing); const [typedContent, isTyping] = useTypedEffect( content, @@ -116,7 +116,12 @@ const Bubble: React.ForwardRefRenderFunction = (props, r if (loading) { contentNode = loadingRender ? loadingRender() : ; } else { - contentNode = mergedContent as React.ReactNode; + contentNode = ( + <> + {mergedContent as React.ReactNode} + {isTyping && typingSuffix} + + ); } let fullContent: React.ReactNode = ( diff --git a/components/bubble/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/bubble/__tests__/__snapshots__/demo-extend.test.ts.snap index cafb1770..d2863204 100644 --- a/components/bubble/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/bubble/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1308,7 +1308,7 @@ exports[`renders components/bubble/demo/typing.tsx extend context correctly 1`]
- A + A💗