update
This commit is contained in:
@ -51,8 +51,8 @@ const MainNav = () => {
|
||||
const pathname = usePathname();
|
||||
const [activePopup, setActivePopup] = useState(-1);
|
||||
return (
|
||||
<nav className={"main-nav bg-[#1958a7] h-[38px]"}>
|
||||
<ul className={"w-full h-full flex"}>
|
||||
<nav className={"main-nav h-[38px] bg-[#1958a7]"}>
|
||||
<ul className={"flex h-full w-full"}>
|
||||
{navigations.map((navigation, index) => (
|
||||
<li
|
||||
className={"relative"}
|
||||
@ -74,17 +74,17 @@ const MainNav = () => {
|
||||
isActive(navigation.href, pathname)
|
||||
? "text-[#dedede]"
|
||||
: "text-white"
|
||||
} hover:text-[#dedede] text-sm h-[38px] flex justify-center items-center min-w-[60px] mx-2.5`}
|
||||
} mx-2.5 flex h-[38px] min-w-[60px] items-center justify-center text-sm hover:text-[#dedede]`}
|
||||
>
|
||||
{navigation.title}
|
||||
</Link>
|
||||
{index === activePopup && navigation.children?.length && (
|
||||
<div
|
||||
className={`z-40 popup-menu min-w-[120px] absolute top-full left-1/2 -translate-x-1/2`}
|
||||
className={`popup-menu absolute left-1/2 top-full z-40 min-w-[120px] -translate-x-1/2`}
|
||||
>
|
||||
<div
|
||||
className={
|
||||
"w-0 h-0 mx-auto border-b-[12px] border-l-[12px] border-r-[12px] border-b-[#b0d3eb] border-l-transparent border-r-transparent"
|
||||
"mx-auto h-0 w-0 border-b-[12px] border-l-[12px] border-r-[12px] border-b-[#b0d3eb] border-l-transparent border-r-transparent"
|
||||
}
|
||||
></div>
|
||||
<ul className={"whitespace-nowrap bg-[#b0d3eb]"}>
|
||||
@ -95,7 +95,7 @@ const MainNav = () => {
|
||||
setActivePopup(() => -1);
|
||||
}}
|
||||
className={
|
||||
"h-10 flex justify-center items-center text-[13px] px-2 hover:text-[#fe5722]"
|
||||
"flex h-10 items-center justify-center px-2 text-[13px] hover:text-[#fe5722]"
|
||||
}
|
||||
href={child.href}
|
||||
>
|
||||
|
Reference in New Issue
Block a user