forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart-dropdown.tsx
More file actions
60 lines (55 loc) · 2.05 KB
/
Copy pathquickstart-dropdown.tsx
File metadata and controls
60 lines (55 loc) · 2.05 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"use client";
import { useRouter } from "next/navigation";
import { ChangeEvent } from "react";
import ChevronDownIcon from "@/components/ui/icons/chevron";
export function QuickstartDropdown() {
const router = useRouter();
const options = [
{ label: "Direct to LLM", url: "/direct-to-llm/guides/quickstart" },
{ label: "LangChain", url: "/langgraph/quickstart" },
{ label: "Deep Agents", url: "/deepagents/quickstart" },
{
label: "Microsoft Agent Framework",
url: "/microsoft-agent-framework/quickstart",
},
{ label: "Mastra", url: "/mastra/quickstart" },
{ label: "LlamaIndex", url: "/llamaindex/quickstart" },
{ label: "Agno", url: "/agno/quickstart" },
{ label: "CrewAI Flows", url: "/crewai-flows/quickstart/crewai" },
{ label: "AG2", url: "/ag2/quickstart" },
{ label: "Pydantic AI", url: "/pydantic-ai/quickstart" },
{ label: "ADK", url: "/adk/quickstart" },
{ label: "A2A", url: "/a2a/quickstart" },
];
const handleSelectChange = (event: ChangeEvent<HTMLSelectElement>) => {
const selectedUrl = event.target.value;
if (selectedUrl) {
router.push(selectedUrl);
}
};
return (
<div className="relative w-full">
<select
onChange={handleSelectChange}
className="
text-[#010507] font-medium dark:text-white dark:color-scheme-dark text-sm p-3 pl-4 pr-10 transition-all duration-100 rounded-lg cursor-pointer w-full bg-[#0105070D] dark:bg-[#FFFFFF1A] font-spline appearance-none"
style={{ colorScheme: "auto" }}
defaultValue=""
>
<option value="" disabled>
CHOOSE INTEGRATION
</option>
{options.map((option) => (
<option
key={option.url}
value={option.url}
className="text-black dark:text-white bg-white dark:bg-neutral-800"
>
{option.label}
</option>
))}
</select>
<ChevronDownIcon className="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-[#010507] dark:text-white" />
</div>
);
}