Skip to main content
⌘K

Search

Search pages, pieces and blocks.

Section header/The head of a part of a page: a title, one short line and an optional action, on the start side or centred.

components/blocks/section-header.tsx
"use client"
import { ArrowRightIcon } from "@/components/icons"import { Button } from "@/components/ui/button"import {  PageHeader,  PageHeaderContent,  PageHeaderDescription,  PageHeaderRow,  PageHeaderTitle,} from "@/components/ui/page-header"
// Section header: the head of a part of a site's page. A title, one short// line under it and an optional action. Page Header's align puts it on the// start side (the action on the end) or in the centre (the action under the// line). Two states: start and centre.
type SectionHeaderState = "start" | "center"
function SectionHeaderBlock({ state }: { state?: SectionHeaderState }) {  const align = state ?? "start"  return (    <section className="mx-auto w-full max-w-6xl px-6 py-16 md:py-24">      <PageHeader align={align}>        <PageHeaderRow>          <PageHeaderContent className="max-w-xl">            <PageHeaderTitle level={2} size="heading">Lessons for every tide</PageHeaderTitle>            <PageHeaderDescription>              Small groups on seven beaches, with the forecast checked the evening before.            </PageHeaderDescription>          </PageHeaderContent>          <Button variant="outline">            See the lessons            <ArrowRightIcon data-icon="inline-end" />          </Button>        </PageHeaderRow>      </PageHeader>    </section>  )}
export { SectionHeaderBlock }export type { SectionHeaderState }