forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrations-tabs.tsx
More file actions
35 lines (31 loc) · 936 Bytes
/
Copy pathintegrations-tabs.tsx
File metadata and controls
35 lines (31 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
const TABS = [
{ href: "/integrations", label: "Explorer" },
{ href: "/integrations/by-feature", label: "By Feature" },
{ href: "/matrix", label: "Compare" },
];
export function IntegrationsTabs() {
const pathname = usePathname();
return (
<div className="flex gap-1 mb-6">
{TABS.map(({ href, label }) => {
const active = pathname === href;
return (
<Link
key={href}
href={href}
className={`rounded-lg px-4 py-2 text-[13px] font-medium transition-colors ${
active
? "bg-[var(--accent-light)] text-[var(--accent)]"
: "text-[var(--text-muted)] hover:text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)]"
}`}
>
{label}
</Link>
);
})}
</div>
);
}