Skip to content

Commit

Permalink
Revert "Code block cursor update (#9692)" (#9707)
Browse files Browse the repository at this point in the history
This reverts commit 15e0d22.
  • Loading branch information
pinotalexandre authored Jan 2, 2025
1 parent 84e7243 commit 15413cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions sparkle/src/components/markdown/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ export function CodeBlock({
style={codeStyle}
language={languageToUse}
PreTag="div"
className="s-cursor-text"
>
{String(children).replace(/\n$/, "")}
</SyntaxHighlighter>
</Suspense>
) : (
<code className="s-mx-0.5 s-cursor-text s-rounded-lg s-border s-border-border-dark s-bg-muted s-px-1.5 s-py-1 s-text-amber-600">
<code className="s-mx-0.5 s-rounded-lg s-border s-border-border-dark s-bg-muted s-px-1.5 s-py-1 s-text-amber-600">
{children}
</code>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions sparkle/src/components/markdown/ContentBlockWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function ContentBlockWrapper({
<div className="s-sticky s-top-0 s-z-[1] s-w-full">
<div
id="BlockActions"
className="s-absolute s-right-2 s-top-2 s-z-50 s-flex s-gap-2"
className="s-flex s-w-full s-justify-end s-gap-1 s-p-2"
>
{actions && actions}
{getContentToDownload && (
Expand All @@ -124,7 +124,9 @@ export function ContentBlockWrapper({
)}
</div>
</div>
<div className={cn("s-z-0 s-w-full", innerClassName)}>{children}</div>
<div className={cn("s-z-0 -s-mt-11 s-w-full", innerClassName)}>
{children}
</div>
</div>
);
}

0 comments on commit 15413cf

Please sign in to comment.