Files
sweet/www/components/gallery/Header.tsx
T
Josh CollinsworthandMarvin Hagemeister e8d1a68b58 www: refresh home page (#2418)
Overhauls the Fresh homepage with a new design, new demos, and new
sections highlighting Fresh's capabilities.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-05-17 16:08:55 +02:00

38 lines
1000 B
TypeScript

import LemonIcon from "https://deno.land/x/tabler_icons_tsx@0.0.6/tsx/lemon-2.tsx";
type Props = {
active: string;
};
export default function Header({ active }: Props) {
const menus = [
{ name: "Home", href: "/" },
// { name: "Components", href: "/components" },
{ name: "Docs", href: "/docs" },
];
return (
<div class="bg-white w-full max-w-screen-lg py-6 px-8 flex flex-col md:flex-row gap-4">
<div class="flex items-center flex-1">
<LemonIcon aria-hidden="true" />
<div class="text-2xl ml-1 font-bold">
Fresh
</div>
</div>
<ul class="flex items-center gap-6">
{menus.map((menu) => (
<li>
<a
href={menu.href}
class={"text-gray-500 hover:text-gray-700 py-1 border-gray-500" +
(menu.href === active ? " font-bold border-b-2" : "")}
>
{menu.name}
</a>
</li>
))}
</ul>
</div>
);
}