Skip to content

Commit

Permalink
Merge pull request #20 from cloudmix-dev/bugfix/code-overflow
Browse files Browse the repository at this point in the history
Code text overflow
  • Loading branch information
samlaycock authored Dec 31, 2023
2 parents 15f1648 + 0e8a96d commit a628664
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-panthers-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudmix-dev/react": patch
---

Fix text overflow handling in Code component
7 changes: 6 additions & 1 deletion packages/react/src/components/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ function Code({ content, copy, fileExplorer, language, numbers }: CodeProps) {
))}
</div>
)}
<div className={cn("flex-grow", fileExplorer && "pt-2")}>
<div
className={cn(
"flex-grow max-w-full overflow-auto",
fileExplorer && "pt-2",
)}
>
<Highlight
code={content.trimEnd()}
language={language}
Expand Down

0 comments on commit a628664

Please sign in to comment.