-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-header.tsx
53 lines (48 loc) · 1019 Bytes
/
page-header.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Balance from "react-wrap-balancer";
import { cn } from "../lib/cn";
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 };