replace style.css by components

This commit is contained in:
2024-05-02 22:57:42 +03:00
parent 79bed2dae6
commit 3652b99f4c
13 changed files with 174 additions and 294 deletions
+9 -5
View File
@@ -2,6 +2,8 @@ import React from "react";
import { Link } from "../link";
import { Nav, NavList } from "./nav-panel.style";
const navList = [
{ title: "Home", href: "#01" },
{ title: "Персонажи", href: "#02" },
@@ -11,14 +13,16 @@ const navList = [
export function NavPanel() {
return (
<nav className="nav">
<ul>
<Nav className="nav">
<NavList>
{navList.map((element, index) => (
<li key={element.href}>
<Link contrast={Boolean(index)} href={element.href}>{element.title}</Link>
<Link contrast={Boolean(index)} href={element.href}>
{element.title}
</Link>
</li>
))}
</ul>
</nav>
</NavList>
</Nav>
);
}