diff --git a/src/components/mdx/code-block-with-copy.tsx b/src/components/content/pre.tsx similarity index 88% rename from src/components/mdx/code-block-with-copy.tsx rename to src/components/content/pre.tsx index 8d88c96..288b8fc 100644 --- a/src/components/mdx/code-block-with-copy.tsx +++ b/src/components/content/pre.tsx @@ -1,18 +1,20 @@ "use client"; import { cn } from "@/lib/utils"; -import { useRef, useState } from "react"; import { Button } from "@/components/ui/button"; import { CheckIcon, CopyIcon } from "lucide-react"; +import { ReactNode, useRef, useState } from "react"; -interface CodeBlockWithCopyProps { - children: React.ReactNode; +interface PreProps { + children?: ReactNode, + className?: string; } -export function CodeBlockWithCopy({ +export function Pre({ children, + className, ...props -}: CodeBlockWithCopyProps) { +}: PreProps) { const preRef = useRef(null); const [copied, setCopied] = useState(false); const [hovered, setHovered] = useState(false); @@ -65,7 +67,7 @@ export function CodeBlockWithCopy({