Skip to content

Commit

Permalink
refactor: change test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshika39 committed Feb 9, 2025
1 parent 9a05cf2 commit 45cf2cc
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions components/code/code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,25 @@ import React, { ReactNode } from "react";
import CopyButton from "@/components/code/copy2clipboard";
import { cn } from "@/lib/utils";

type CodeBlockProps = {
children: ReactNode;
className?: string;
copyString?: string;
}

export default function CodeBlock({
children,
className,
copyString,
}: {
children: ReactNode;
className?: string;
copyString?: string;
}) {
}: CodeBlockProps) {
return (
<div
className={cn(
"relative bg-gray-300 grid grid-cols-6 gap-x-2 w-full dark:bg-gray-700 rounded-md p-4 justify-between",
className,
)}
>
)}>
<pre
className={
"text-foreground col-span-5 whitespace-pre-wrap w-full content-center overflow-x-auto "
}
>
className={"text-foreground col-span-5 whitespace-pre-wrap w-full content-center overflow-x-auto"}>
{children}
</pre>
<CopyButton
Expand Down

0 comments on commit 45cf2cc

Please sign in to comment.