Created
August 30, 2025 18:04
-
-
Save ravinggenius/c402d05ce90e63d97d9731f314e84b2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import classNames from "classnames"; | |
| import Link, { LinkProps } from "next/link"; | |
| import { AnchorHTMLAttributes, ComponentProps } from "react"; | |
| import styles from "./Anchor.module.scss"; | |
| export default function Anchor({ | |
| children, | |
| className, | |
| ...linkProps | |
| }: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> & | |
| LinkProps<string> & { | |
| children: string; | |
| className?: string; | |
| }) { | |
| return ( | |
| <Link | |
| {...linkProps} | |
| className={classNames(styles.anchor, className)} | |
| > | |
| {children} | |
| </Link> | |
| ); | |
| } | |
| export type AnchorProps = ComponentProps<typeof Anchor>; | |
| export type InternalHref = AnchorProps["href"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment