From 721ea5cad2563d049867f3ac2a054e4b11acdf52 Mon Sep 17 00:00:00 2001 From: Akhileshrangani4 Date: Sat, 30 Nov 2024 01:33:54 -0500 Subject: [PATCH] feat: sticky copy-reply button on chat code-snippets --- .../editor/AIChat/lib/markdownComponents.tsx | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/frontend/components/editor/AIChat/lib/markdownComponents.tsx b/frontend/components/editor/AIChat/lib/markdownComponents.tsx index c5cbbf3..e6e1418 100644 --- a/frontend/components/editor/AIChat/lib/markdownComponents.tsx +++ b/frontend/components/editor/AIChat/lib/markdownComponents.tsx @@ -25,39 +25,40 @@ export const createMarkdownComponents = ( const match = /language-(\w+)/.exec(className || "") return match ? ( -
-
+
+
{match[1]}
-
- {renderCopyButton(children)} - -
-
- - {stringifyContent(children)} - +
+
+ {renderCopyButton(children)} +
+ +
+ + {stringifyContent(children)} +
) : (