diff --git a/packages/react/src/components/LoadedCode.tsx b/packages/react/src/components/LoadedCode.tsx index c458847..29b4e0d 100644 --- a/packages/react/src/components/LoadedCode.tsx +++ b/packages/react/src/components/LoadedCode.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import {forwardRef, useEffect, useState} from "react"; import SyntaxHighlighter from "react-syntax-highlighter"; import { gruvboxDark } from "react-syntax-highlighter/dist/cjs/styles/hljs"; import { Button } from "@components/Button"; @@ -71,3 +71,49 @@ export const LoadedCode = ({ ); }; + +export const Code = forwardRef(({ + children, + className, + language, +}, ref) => { + const { toast } = useToast(); + + return ( +
+ + + {children} + +
+ ); +});