diff --git a/src/lib/components/organisms/Navbar/Navbar.stories.tsx b/src/lib/components/organisms/Navbar/Navbar.stories.tsx index 5837dae..75f627f 100644 --- a/src/lib/components/organisms/Navbar/Navbar.stories.tsx +++ b/src/lib/components/organisms/Navbar/Navbar.stories.tsx @@ -89,7 +89,7 @@ WithCTA.args = { Home - + Construction @@ -131,12 +131,12 @@ WithNavbarDropdown.args = { Home - + {buildExpansionAsChildren(EXPANSION_ITEMS)} - + {buildExpansionAsChildren(EXPANSION_ITEMS, true)} diff --git a/src/lib/components/organisms/Navbar/Navbar.theme.tsx b/src/lib/components/organisms/Navbar/Navbar.theme.tsx index 7186aec..0d7d024 100644 --- a/src/lib/components/organisms/Navbar/Navbar.theme.tsx +++ b/src/lib/components/organisms/Navbar/Navbar.theme.tsx @@ -26,40 +26,40 @@ export type NavBarTheme = { }; container: { base: string; - opened: string; + closed: string; }; }; }; export const NAV_BAR_THEME: NavBarTheme = { - base: 'border-gray-200 flex min-h-[65px] z-10', - innerBase: 'mx-auto flex items-center justify-between gap-5', - brand: 'flex items-center', + base: '', + innerBase: '', + brand: '', fixedTransparentStyle: '', - background: 'bg-primary-500', + background: '', collapse: { - base: 'w-full md:block h-full', - list: 'mt-4 flex flex-col md:mt-0 md:flex-row items-center w-full md:justify-end md:gap-10 gap-0 h-full' + base: '', + list: '' }, link: { - base: 'block pr-4 pl-3 md:p-0 md:py-0 py-2 mx-auto', - active: 'bg-primary-700 text-white md:bg-transparent md:text-primary-700', - disabled: 'text-gray-400 hover:cursor-not-allowed', - underline: 'h-[2px] rounded-lg bg-secondary-200 transition-all duration-500' + base: '', + active: '', + disabled: '', + underline: '' }, toggle: { - base: 'inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200:bg-gray-700:ring-gray-600 md:hidden', - icon: 'h-6 w-6 shrink-0' + base: '', + icon: '' }, group: { - base: 'gap-1 items-center justify-center md:justify-start', + base: '', icon: { - base: 'transition duration-500 ease-in-out absolute -left-2 md:relative md:left-0', - opened: '-rotate-180 md:rotate-180' + base: '', + opened: '' }, container: { - base: 'md:px-5 md:py-2.5 md:fixed w-full md:rounded-t-none rounded-t-md rounded-b-md bg-slate-100 md:items-start items-center flex flex-col left-0 transition duration-300 ease-in-out overflow-hidden top-0 md:-z-10', - opened: 'md:-translate-y-full md:scale-y-0 opacity-0 md:h-fit h-0' + base: '', + closed: '' } } }; diff --git a/src/lib/components/organisms/Navbar/Navbar.tsx b/src/lib/components/organisms/Navbar/Navbar.tsx index c5a6793..fc23349 100644 --- a/src/lib/components/organisms/Navbar/Navbar.tsx +++ b/src/lib/components/organisms/Navbar/Navbar.tsx @@ -1,8 +1,7 @@ import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'; -import classNames from 'classnames'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; import { useEffect, useState } from 'react'; -import { twMerge } from 'tailwind-merge'; +import { twJoin, twMerge } from 'tailwind-merge'; import { useTheme } from '../../bosons/HelloInternet/ThemeContext'; import { NavbarContext } from './NavbarContext'; import { NavbarSticky, useStickyNavbar } from './useFixedNavbar'; @@ -31,21 +30,30 @@ export const Navbar: FC = ({ children, menuOpen, fluid = f