aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links/nav-link.tsx
blob: 66ee570b4f97acb5f03123246c81b89c429a5a96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Link from 'next/link';
import { FC, ReactNode } from 'react';
import styles from './nav-link.module.scss';

export type NavLinkProps = {
  /**
   * Link target.
   */
  href: string;
  /**
   * Link label.
   */
  label: string;
  /**
   * Link logo.
   */
  logo?: ReactNode;
};

/**
 * NavLink component
 *
 * Render a navigation link.
 */
const NavLink: FC<NavLinkProps> = ({ href, label, logo }) => {
  return (
    <Link className={styles.link} href={href}>
      {logo}
      {label}
    </Link>
  );
};

export default NavLink;