From 15413cffc48314073d09396d5218d4a8fd33f5a8 Mon Sep 17 00:00:00 2001 From: Alexandre Pinot <32997243+pinotalexandre@users.noreply.github.com> Date: Thu, 2 Jan 2025 17:20:35 +0100 Subject: [PATCH] Revert "Code block cursor update (#9692)" (#9707) This reverts commit 15e0d22c966bacc8fd4af6257ceffb6518604360. --- sparkle/src/components/markdown/CodeBlock.tsx | 3 +-- .../components/markdown/CodeBlockWithExtendedSupport.tsx | 7 ------- sparkle/src/components/markdown/ContentBlockWrapper.tsx | 6 ++++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/sparkle/src/components/markdown/CodeBlock.tsx b/sparkle/src/components/markdown/CodeBlock.tsx index 34f489984ca2..babac73234e9 100644 --- a/sparkle/src/components/markdown/CodeBlock.tsx +++ b/sparkle/src/components/markdown/CodeBlock.tsx @@ -125,13 +125,12 @@ export function CodeBlock({ style={codeStyle} language={languageToUse} PreTag="div" - className="s-cursor-text" > {String(children).replace(/\n$/, "")} ) : ( - + {children} ); diff --git a/sparkle/src/components/markdown/CodeBlockWithExtendedSupport.tsx b/sparkle/src/components/markdown/CodeBlockWithExtendedSupport.tsx index bb5d89371375..c46d97a49a5e 100644 --- a/sparkle/src/components/markdown/CodeBlockWithExtendedSupport.tsx +++ b/sparkle/src/components/markdown/CodeBlockWithExtendedSupport.tsx @@ -104,14 +104,7 @@ const mermaidStyles = ` /* Base diagram styles */ .mermaid { background: ${palette.slate[50]}; - cursor: default; } - - .mermaid text, - .mermaid .nodeLabel, - .mermaid .edgeLabel, - .mermaid .label { - cursor: text; /* Cluster styles */ .mermaid .cluster rect { diff --git a/sparkle/src/components/markdown/ContentBlockWrapper.tsx b/sparkle/src/components/markdown/ContentBlockWrapper.tsx index bb92749a9271..3edffe4cb38b 100644 --- a/sparkle/src/components/markdown/ContentBlockWrapper.tsx +++ b/sparkle/src/components/markdown/ContentBlockWrapper.tsx @@ -101,7 +101,7 @@ export function ContentBlockWrapper({
{actions && actions} {getContentToDownload && ( @@ -124,7 +124,9 @@ export function ContentBlockWrapper({ )}
-
{children}
+
+ {children} +
); }