Skip to content

Commit

Permalink
Use heading in header
Browse files Browse the repository at this point in the history
  • Loading branch information
oBusk committed May 2, 2023
1 parent f23893e commit a551a62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/app/_layout/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from "next/link";
import { forwardRef, HTMLAttributes } from "react";
import Heading from "^/components/ui/Heading";
import cn from "^/lib/cn";
import ColorModeToggle from "./ColorModeToggle";
import GithubLink from "./GithubLink";
Expand All @@ -25,9 +26,7 @@ const Header = forwardRef<HTMLElement, HeaderProps>(
href="/"
className="block rounded-md transition-all duration-200 hover:no-underline focus:outline-none"
>
<h1 className="text-xl font-bold sm:text-2xl lg:text-4xl">
npm-diff.app 馃摝馃攦
</h1>
<Heading variant="h1">npm-diff.app 馃摝馃攦</Heading>
</Link>
<div className="flex items-center justify-end">
<NavLink href="/about">about</NavLink>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ui/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { forwardRef, HTMLAttributes } from "react";
const headingVariants = cva("font-bold", {
variants: {
variant: {
h1: "text-4xl",
h2: "text-3xl",
h3: "text-2xl",
h4: "text-xl",
h1: "text-xl sm:text-2xl md:text-3xl lg:text-4xl",
h2: "text-xl md:text-2xl lg:text-3xl",
h3: "text-lg md:text-xl lg:text-2xl",
h4: "text-lg lg:text-xl",
},
},
});
Expand Down

0 comments on commit a551a62

Please sign in to comment.