import dynamic from "next/dynamic"; import type { ReactNode } from "react"; type CustomCodeProps = { className?: string; children: ReactNode; }; const CustomCode = (props: CustomCodeProps) => { if (props.className?.split(" ").includes("code-highlight")) { const CopyButton = dynamic(() => import("../clipboard/CopyButton")); // full multi-line code blocks with prism highlighting and copy-to-clipboard button return ( <>
{props.children}
{props.children}
;
}
};
export default CustomCode;