mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 14:08:47 +00:00
* feat(form): add form component * feat(www): update site styles * feat: add form examples * docs(www): add docs for forms * docs(www): hide tabs for docs demo
54 lines
1015 B
TypeScript
54 lines
1015 B
TypeScript
import Balance from "react-wrap-balancer"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
function PageHeader({
|
|
className,
|
|
children,
|
|
...props
|
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
return (
|
|
<section
|
|
className={cn(
|
|
"flex max-w-[980px] flex-col items-start gap-2 px-4 pt-8 md:pt-12",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</section>
|
|
)
|
|
}
|
|
|
|
function PageHeaderHeading({
|
|
className,
|
|
...props
|
|
}: React.HTMLAttributes<HTMLHeadingElement>) {
|
|
return (
|
|
<h1
|
|
className={cn(
|
|
"text-3xl font-bold leading-tight tracking-tighter md:text-5xl lg:leading-[1.1]",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function PageHeaderDescription({
|
|
className,
|
|
...props
|
|
}: React.HTMLAttributes<HTMLParagraphElement>) {
|
|
return (
|
|
<Balance
|
|
className={cn(
|
|
"max-w-[750px] text-lg text-muted-foreground sm:text-xl",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { PageHeader, PageHeaderHeading, PageHeaderDescription }
|