1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:01:19 -04:00

all components should accept additional classnames

This commit is contained in:
2022-01-20 12:06:05 -05:00
parent 2162e9d563
commit 7e37adabc1
22 changed files with 150 additions and 86 deletions

View File

@@ -1,19 +1,21 @@
import { memo } from "react";
import { useRouter } from "next/router";
import Link from "next/link";
import classNames from "classnames";
import type { ReactNode } from "react";
import styles from "./PageTitle.module.css";
type Props = {
children: ReactNode;
className?: string;
};
const PageTitle = ({ children }: Props) => {
const PageTitle = ({ children, className }: Props) => {
const router = useRouter();
return (
<h1 className={styles.title}>
<h1 className={classNames(styles.title, className)}>
<Link href={router.asPath}>
<a>{children}</a>
</Link>