project-nomad/admin/inertia/components/markdoc/Heading.tsx
Chris Sherwood 1a95b84a8c feat(docs): polish docs rendering with desert-themed components
Add custom Markdoc renderers for images, links, paragraphs, code blocks,
inline code, and horizontal rules. Restyle existing heading, table, and
list components to match the desert tactical color palette. Add 8
screenshots to docs with polished image presentation (rounded corners,
shadow, captions). Constrain content width for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:41:30 -08:00

29 lines
837 B
TypeScript

import React, { JSX } from 'react'
export function Heading({
level,
id,
children,
}: {
level: number
id: string
children: React.ReactNode
}) {
const Component = `h${level}` as keyof JSX.IntrinsicElements
const styles: Record<number, string> = {
1: 'text-3xl font-bold text-desert-green-darker pb-3 mb-6 mt-2 border-b-2 border-desert-orange',
2: 'text-2xl font-bold text-desert-green-dark pb-2 mb-5 mt-10 border-b border-desert-tan-lighter',
3: 'text-xl font-semibold text-desert-green-dark mb-3 mt-8',
4: 'text-lg font-semibold text-desert-green mb-2 mt-6',
5: 'text-base font-semibold text-desert-green mb-2 mt-5',
6: 'text-sm font-semibold text-desert-green mb-2 mt-4',
}
return (
// @ts-ignore
<Component id={id} className={styles[level]}>
{children}
</Component>
)
}