Added routes and navbar

This commit was merged in pull request #2.
This commit is contained in:
Ebube
2024-03-05 15:57:26 +01:00
parent c43a21794f
commit 4e60c4b4c7
23 changed files with 2125 additions and 214 deletions
+83
View File
@@ -0,0 +1,83 @@
import React from "react";
import Logo from "../../assets/icons/logo.svg";
import Button from "../shared/Button";
import { lowerMenuItems } from "../../utils/data";
const Header = () => {
return (
<div className="relative my-2 items-center justify-center flex">
<div className="container px-8 flex justify-between">
<img src={Logo} alt="" />
{/* Right Part of the navbar */}
<div className="flex flex-col justify-between items-end">
<ul className={`flex gap-4 items-center`}>
<li>
<a href="#">
<Button className="btn-active" text="Open An Account" />
</a>
</li>
<li>
<a href="#">
<Button text="Internet Banking" />
</a>
</li>
<li>
<a href="#">
<Button text="Contact Us" />
</a>
</li>
<li>
<SearchInput />
</li>
</ul>
<ul className="flex gap-4 items-center">
{lowerMenuItems.map((item) => (
<li
key={item.id}
className="cursor-pointer text-[13.5px] font-medium text-[#525252] tracking-[1px] leading-[-0.3pt]"
>
{item.name}
</li>
))}
</ul>
</div>
</div>
</div>
);
};
export default Header;
const SearchInput = ({ value, onChange }) => {
return (
<div className="flex items-center border border-[#5A2C82] overflow-hidden">
<input
type="text"
value={value}
onChange={onChange}
className="py-[6px] px-[12px] w-full outline-none text-[#333] text-sm"
placeholder="Search..."
/>
<button
type="button"
className="flex items-center justify-center bg-transparent text-[#5A2C82] p-2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="w-6 h-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
/>
</svg>
</button>
</div>
);
};
+22
View File
@@ -0,0 +1,22 @@
import { top_header_data } from "../../utils/data";
import styles from "./header.module.css";
const TopHeader = () => {
return (
<div className={styles.top_header}>
<div className="container flex justify-between w-full text-white font-medium">
<ul className="flex gap-8 items-center px-4">
{top_header_data.map(({ id, name }): {} => (
<li key={id}>{name}</li>
))}
</ul>
<div className="flex gap-2">
<p className="uppercase">Today's Share price:</p>
<span className="text-[#F8B51F]">$ 4.00</span>
</div>
</div>
</div>
);
};
export default TopHeader;
+8
View File
@@ -0,0 +1,8 @@
.top_header{
background: url(../../assets/images/topbar_back.jpg) no-repeat;
background-size: cover;
height: 2.535rem;
display: flex;
align-items: center;
justify-content: center;
}
+4
View File
@@ -0,0 +1,4 @@
import TopHeader from "./TopHeader";
import Header from "./Header";
export { TopHeader, Header };