mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
Major AgentConfigForm rework with improved adapter configuration fields and layout. Refine sidebar, breadcrumbs, and card/tab components for visual consistency. Clean up page layouts across Activity, Agents, Approvals, Costs, Dashboard, Goals, Inbox, Issues, Org, and Projects pages. Minor heartbeat-run CLI fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1 KiB
TypeScript
42 lines
1 KiB
TypeScript
import { NavLink } from "react-router-dom";
|
|
import { cn } from "../lib/utils";
|
|
import type { LucideIcon } from "lucide-react";
|
|
|
|
interface SidebarNavItemProps {
|
|
to: string;
|
|
label: string;
|
|
icon: LucideIcon;
|
|
end?: boolean;
|
|
badge?: number;
|
|
}
|
|
|
|
export function SidebarNavItem({
|
|
to,
|
|
label,
|
|
icon: Icon,
|
|
end,
|
|
badge,
|
|
}: SidebarNavItemProps) {
|
|
return (
|
|
<NavLink
|
|
to={to}
|
|
end={end}
|
|
className={({ isActive }) =>
|
|
cn(
|
|
"flex items-center gap-2.5 px-3 py-2 text-[13px] font-medium transition-colors",
|
|
isActive
|
|
? "bg-accent text-foreground"
|
|
: "text-foreground/80 hover:bg-accent/50 hover:text-foreground"
|
|
)
|
|
}
|
|
>
|
|
<Icon className="h-4 w-4 shrink-0" />
|
|
<span className="flex-1 truncate">{label}</span>
|
|
{badge != null && badge > 0 && (
|
|
<span className="ml-auto text-xs bg-primary text-primary-foreground rounded-full px-1.5 py-0.5 leading-none">
|
|
{badge}
|
|
</span>
|
|
)}
|
|
</NavLink>
|
|
);
|
|
}
|