Files
supabase/apps/www/components/Sections/PageHeader.tsx
Francesco Sansalvadore 90ef7ea874 www: standardize container width (#47226)
Define and clean up standard container width definition for marketing
website.

PR breakdown of #43455 
Related: #47227 #47228 #47236
2026-06-24 10:26:38 +00:00

32 lines
953 B
TypeScript

import type { ReactNode } from 'react'
import { cn } from 'ui'
import SectionContainerWithCn from '../Layouts/SectionContainerWithCn'
interface Props {
breadcrumb?: ReactNode
title?: string
h1: ReactNode
subheader?: ReactNode
className?: string
}
const PageHeader = ({ breadcrumb, title, h1, subheader, className }: Props) => (
<div className={cn('w-full border-b bg-alternative', className)}>
<SectionContainerWithCn height="narrow">
{breadcrumb && <div className="mb-6">{breadcrumb}</div>}
{title && (
<p className="mb-3 font-mono text-sm uppercase tracking-widest text-brand">{title}</p>
)}
<h1 className="h1 font-normal tracking-tight text-foreground md:text-3xl lg:text-4xl">
{h1}
</h1>
{subheader && (
<p className="mt-3 max-w-2xl text-base text-foreground-light lg:text-lg">{subheader}</p>
)}
</SectionContainerWithCn>
</div>
)
export default PageHeader