ig.rizaldy.club/components/Navbar.js

29 lines
769 B
JavaScript
Raw Normal View History

2024-01-31 00:49:51 +07:00
import Link from "next/link";
2024-02-28 01:45:51 +07:00
import ExportedImage from "next-image-export-optimizer";
2024-01-31 00:49:51 +07:00
const Navbar = ({ name, logo }) => (
2024-02-02 18:44:54 +07:00
<nav className="flex py-2 border-b dark:border-neutral-800 hover:opacity-70">
2024-02-04 05:44:56 +07:00
<div className="w-3/12 md:w-full lg:w-7/12 md:mx-11 lg:mx-auto">
2024-01-31 00:49:51 +07:00
<div className="md:w-2/12">
<Link href="/">
{logo ? (
2024-02-28 01:45:51 +07:00
<ExportedImage
alt={name}
src={logo}
width={224}
height={56}
className="w-full"
/>
2024-01-31 00:49:51 +07:00
) : (
<h1 className="font-bold leading-relaxed tracking-tight text-2xl text-neutral-800">
{name}
</h1>
)}
</Link>
</div>
</div>
</nav>
);
export default Navbar;