fix: code blocks rendering + consistent styling with ciphera-website #74

Merged
uz1mani merged 3 commits from staging into main 2026-03-29 00:12:24 +00:00
30 changed files with 231 additions and 81 deletions
Showing only changes of commit 6c73fd1dbc - Show all commits

View File

@@ -19,12 +19,9 @@ import { IntegrationGuide } from '@/components/IntegrationGuide'
// * ─── MDX Components ────────────────────────────────────────────
// rehype-mdx-code-props passes meta (e.g. filename="app.tsx") as props
// on the <pre> element. We intercept <pre> to extract filename and render CodeBlock.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mdxComponents = {
pre: ({ children, filename, ...props }: {
children: React.ReactElement
filename?: string
[key: string]: unknown
}) => {
pre: ({ children, filename, ...props }: any) => {
const code = children?.props?.children
if (typeof code === 'string') {
return (