diff --git a/src/components/ui/code.tsx b/src/components/ui/code.tsx index b9ee210..c242f4a 100644 --- a/src/components/ui/code.tsx +++ b/src/components/ui/code.tsx @@ -1,17 +1,29 @@ -import { cn } from "@/lib/utils"; +import { cn, copyToClipboard } from "@/lib/utils"; import React from "react"; +import Button from "./button"; +import { Copy } from "lucide-react"; -type Props = React.ComponentPropsWithoutRef<"code">; +type Props = Omit, "children"> & { + children?: string; +}; -const Code = ({ className, ...props }: Props) => { +const Code = ({ className, children, ...props }: Props) => { return ( + > + {children} +