Files
kit-ui/components/pastel/layout/Navbar.tsx
Sebastian Krüger 7806bcbede refactor: flatten Pastel routes by removing intermediate palettes and accessibility paths
- Move sub-routes from /pastel/palettes/* and /pastel/accessibility/* to direct children of /pastel
- Update AppSidebar navigation links
- Update Pastel Navbar and Footer links
- Update Tailwind source directives in pastel/globals.css
- Remove intermediate page files
2026-02-23 08:18:44 +01:00

77 lines
2.5 KiB
TypeScript

'use client';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { ThemeToggle } from './ThemeToggle';
import { cn } from '@/lib/utils/cn';
import { Palette } from 'lucide-react';
const navigation = [
{ name: 'Playground', href: '/pastel' },
{ name: 'Harmony', href: '/pastel/harmony' },
{ name: 'Contrast', href: '/pastel/contrast' },
{ name: 'Names', href: '/pastel/names' },
{ name: 'Batch', href: '/pastel/batch' },
];
export function Navbar() {
const pathname = usePathname();
return (
<nav className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div className="max-w-7xl mx-auto px-8">
<div className="flex h-16 items-center justify-between">
{/* Logo */}
<Link href="/" className="flex items-center space-x-2 font-bold text-xl">
<Palette className="h-6 w-6 text-primary" />
<span className="bg-gradient-to-r from-pink-500 via-purple-500 to-blue-500 bg-clip-text text-transparent">
Pastel UI
</span>
</Link>
{/* Desktop Navigation */}
<div className="hidden md:flex items-center space-x-1">
{navigation.map((item) => (
<Link
key={item.href}
href={item.href}
className={cn(
'px-3 py-2 rounded-md text-sm font-medium transition-colors',
pathname === item.href
? 'bg-accent text-accent-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
)}
>
{item.name}
</Link>
))}
</div>
{/* Right side */}
<div className="flex items-center space-x-2">
<ThemeToggle />
</div>
</div>
{/* Mobile Navigation */}
<div className="md:hidden pb-3 space-y-1">
{navigation.map((item) => (
<Link
key={item.href}
href={item.href}
className={cn(
'block px-3 py-2 rounded-md text-sm font-medium transition-colors',
pathname === item.href
? 'bg-accent text-accent-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
)}
>
{item.name}
</Link>
))}
</div>
</div>
</nav>
);
}