awesome ui changes

This commit is contained in:
2025-04-07 19:58:58 +02:00
parent 0cec39717e
commit 2ddbef6627
52 changed files with 1965 additions and 484 deletions
+34 -13
View File
@@ -2,25 +2,46 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
import React from "react";
import * as LucideIcons from "lucide-react";
import { Icons } from "./icons";
import { Button } from "./ui/button";
import { cn } from "@/lib/utils";
function NavLink({ href, name, icon }: NavLink) {
const active = usePathname() === href;
const IconComponent = icon
? (LucideIcons[icon as keyof typeof LucideIcons] as LucideIcons.LucideIcon)
: null;
const IconComponent = icon ? Icons[icon as keyof typeof Icons] : null;
return (
<Button
asChild
size={"icon"}
variant={"ghost"}
className={cn(active && "text-primary bg-accent/25")}
>
<Link href={href}>{IconComponent && <IconComponent />}</Link>
</Button>
<div className="relative">
<Button
asChild
variant={"ghost"}
className={cn(
"p-2 size-12 text-muted-foreground/75 flex flex-col gap-2 ",
active && "text-foreground "
)}
>
<Link href={href}>
{IconComponent && (
<IconComponent
className={cn(
"size-6 transition-transform duration-300",
active && "scale-150"
)}
/>
)}
<span
className={cn(
"text-xs -translate-y-1 transition-transform duration-300",
active && "translate-y-0"
)}
>
{name}
</span>
</Link>
</Button>
{active && (
<div className="h-16 w-16 left-1/2 -z-10 -translate-x-1/2 transform blur-3xl absolute -bottom-8 bg-primary" />
)}
</div>
);
}