diff options
Diffstat (limited to 'src/components/atoms/links/nav-link.tsx')
| -rw-r--r-- | src/components/atoms/links/nav-link.tsx | 36 | 
1 files changed, 36 insertions, 0 deletions
| diff --git a/src/components/atoms/links/nav-link.tsx b/src/components/atoms/links/nav-link.tsx new file mode 100644 index 0000000..7c6fede --- /dev/null +++ b/src/components/atoms/links/nav-link.tsx @@ -0,0 +1,36 @@ +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 href={href}> +      <a className={styles.link}> +        {logo} +        {label} +      </a> +    </Link> +  ); +}; + +export default NavLink; | 
