Files
docs/examples/marble-cms/components/code-block.tsx
T
zeekay 8ea4ad783e chore: complete fumadocs -> @hanzo/docs rebrand
- Rename all packages from fumadocs-* to @hanzo/docs-*
- Update all imports across apps, examples, and packages
- Update documentation and content references
- Sync lockfile with new package names
2025-12-17 14:49:52 -08:00

23 lines
520 B
TypeScript

import * as Base from '@hanzo/docs/ui/components/codeblock';
import { highlight } from '@hanzo/docs/core/highlight';
import { type HTMLAttributes } from 'react';
export async function CodeBlock({
code,
lang,
...rest
}: HTMLAttributes<HTMLElement> & {
code: string;
lang: string;
}) {
const rendered = await highlight(code, {
lang,
components: {
pre: (props) => <Base.Pre {...props} />,
},
// other Shiki options
});
return <Base.CodeBlock {...rest}>{rendered}</Base.CodeBlock>;
}