mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-09-08 13:35:59 +00:00
refactor(navbar): extrair NavbarShell e adicionar variante navbar no Button
Unifica a estrutura da navbar entre o app e a landing page via novo componente NavbarShell. Centraliza estilos de botões da navbar na variante `navbar` do Button, eliminando nav-styles.ts e as classes inline duplicadas. AnimatedThemeToggler, RefreshPageButton e MobileNav passam a aceitar prop `variant` para adaptar ao contexto. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
import { buttonVariants } from "@/shared/components/ui/button";
|
||||
import { cn } from "@/shared/utils/ui";
|
||||
import { NavLink } from "./nav-link";
|
||||
import { linkActive, linkBase, linkIdle } from "./nav-styles";
|
||||
|
||||
type NavPillProps = {
|
||||
href: string;
|
||||
@@ -23,7 +23,11 @@ export function NavPill({ href, preservePeriod, children }: NavPillProps) {
|
||||
<NavLink
|
||||
href={href}
|
||||
preservePeriod={preservePeriod}
|
||||
className={cn(linkBase, isActive ? linkActive : linkIdle)}
|
||||
className={cn(
|
||||
buttonVariants({ variant: "navbar", size: "sm" }),
|
||||
"lowercase",
|
||||
isActive && "bg-black/15 text-black",
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</NavLink>
|
||||
|
||||
Reference in New Issue
Block a user