From 9b445e635e2694c0d6095a1a2613fc59314dc595 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 4 Apr 2022 12:12:26 +0200 Subject: chore: add a NavLink component --- src/components/atoms/links/nav-link.tsx | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/components/atoms/links/nav-link.tsx (limited to 'src/components/atoms/links/nav-link.tsx') 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 = ({ href, label, logo }) => { + return ( + + + {logo} + {label} + + + ); +}; + +export default NavLink; -- cgit v1.2.3