Files
supabase/apps/docs/features/ui/guide/GuideHeader.tsx
Francesco Sansalvadore 9b05afa2a3 Fix(docs): guides subheadings (#47765)
Fix docs subheading by removing the h2 html tag and adjusting styling.
Likely a result of a merge conflict resolution between #47441 and #47288

## What is the current behavior?

<img width="1168" height="641" alt="Screenshot 2026-07-09 at 10 19 00"
src="https://github.com/user-attachments/assets/c23b2e88-650c-4835-ae10-5a13c7b2e180"
/>


## What is the new behavior?

<img width="1167" height="605" alt="Screenshot 2026-07-09 at 10 32 56"
src="https://github.com/user-attachments/assets/852f208c-2b22-4bf6-ad8c-edcf5bee5991"
/>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Style**
* Refined how guide subtitles are displayed for a cleaner, more
consistent layout.
* Adjusted subtitle spacing and presentation while keeping subtitle
content rendering with formatted text support intact.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-09 10:54:45 +02:00

28 lines
675 B
TypeScript

'use client'
import ReactMarkdown from 'react-markdown'
import { cn } from 'ui'
import { useGuide } from './Guide'
interface GuideHeaderProps {
className?: string
}
export function GuideHeader({ className }: GuideHeaderProps) {
const { meta } = useGuide()
return (
<div className={cn('mb-8', className)}>
<h1 className="mt-0 mb-0 [&>p]:m-0">
<ReactMarkdown>{meta?.title || 'Supabase Docs'}</ReactMarkdown>
</h1>
{meta?.subtitle && (
<div className="mt-3 not-prose [&_p]:text-xl [&_p]:leading-7 text-foreground-light [&>p]:m-0">
<ReactMarkdown>{meta.subtitle}</ReactMarkdown>
</div>
)}
</div>
)
}