mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 03:45:22 -04:00
23 lines
670 B
TypeScript
23 lines
670 B
TypeScript
import cn from "../../lib/helpers/classnames";
|
|
import Link from "../Link";
|
|
import type { ComponentPropsWithoutRef } from "react";
|
|
|
|
export type PageTitleProps = ComponentPropsWithoutRef<"h1"> & {
|
|
canonical: string;
|
|
};
|
|
|
|
const PageTitle = ({ canonical, className, children, ...rest }: PageTitleProps) => {
|
|
return (
|
|
<h1 className={cn("mt-1 mb-6 text-left text-3xl font-medium lowercase", className)} {...rest}>
|
|
<Link
|
|
href={canonical}
|
|
className="before:mr-[-0.1em] before:tracking-widest before:text-gray-500 before:content-['\002E\002F'] hover:no-underline"
|
|
>
|
|
{children}
|
|
</Link>
|
|
</h1>
|
|
);
|
|
};
|
|
|
|
export default PageTitle;
|