Files
jarv.is/components/layout/page-title.tsx
T

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 };