Skip to content

Commit 3cf4a2a

Browse files
style: text-blocks
1 parent a0b8d49 commit 3cf4a2a

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

apps/web/components/CodeBlock.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
font-size: 15px;
55
word-wrap: break-word;
66
white-space: pre-wrap;
7-
background: #161b22;
7+
background: #0f172a;
88
overflow: auto;
99
line-height: 1.6;
10-
border: 1px solid #333;
11-
border-left: 3px solid #e81029;
10+
border: 1px solid #10b981;
11+
border-left: 2px solid #b91c1c;
1212
color: #564;
1313
min-width: 200px;
1414
width: 800px;

apps/web/components/CodeBlock.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ export default function CodeBlock({ block }: { block: any }) {
1717
return (
1818
<div className="max-w-full relative">
1919
<div className={`${styles.copy_block} absolute top-2 right-2 z-10`}>
20-
<button
21-
className="text-gray-500 p-1 relative"
22-
onClick={() => {
23-
navigator.clipboard.writeText(code).then(() => {
24-
setShowCopiedMessage(true);
25-
setTimeout(() => {
26-
setShowCopiedMessage(false);
27-
}, 2000);
28-
});
29-
}}
30-
>
31-
{showCopiedMessage ? <CopyTick /> : <CopyIcon />}
32-
</button>
20+
<button
21+
className="text-gray-500 p-1 relative"
22+
onClick={() => {
23+
navigator.clipboard.writeText(code).then(() => {
24+
setShowCopiedMessage(true);
25+
setTimeout(() => {
26+
setShowCopiedMessage(false);
27+
}, 2000);
28+
});
29+
}}
30+
>
31+
{showCopiedMessage ? <CopyTick /> : <CopyIcon />}
32+
</button>
3333
</div>
3434
<div className="max-w-full overflow-auto relative">
35-
<pre className={`${styles.code_block} px-4 sm:px-6 md:px-8`}>
35+
<pre className={`${styles.code_block} rounded-3xl px-4 sm:px-6 md:px-8`}>
3636
<code className="language-javascript">{code}</code>
3737
</pre>
3838
</div>

0 commit comments

Comments
 (0)