mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-20 16:55:32 -04:00
30 lines
572 B
TypeScript
30 lines
572 B
TypeScript
import Link from "next/link";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const PageTitle = ({
|
|
canonical,
|
|
className,
|
|
children,
|
|
...rest
|
|
}: React.ComponentProps<"h1"> & {
|
|
canonical: string;
|
|
}) => (
|
|
<h1
|
|
className={cn(
|
|
"not-prose mt-0 mb-6 text-left text-2xl font-medium tracking-tight lowercase",
|
|
className,
|
|
)}
|
|
{...rest}
|
|
>
|
|
<Link
|
|
href={canonical}
|
|
className="text-foreground no-underline before:tracking-wider before:text-muted-foreground before:content-['./']"
|
|
>
|
|
{children}
|
|
</Link>
|
|
</h1>
|
|
);
|
|
|
|
export { PageTitle };
|