mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
760fc65187
Add a Learn-only sidebar mode that mirrors how /reference works: when a user is under /learn, the framework picker is hidden and the sidebar shows only learn content (What's New, Agentic Protocols, Generative UI, Specs, Architecture, Tutorials). - Add `learn` to the root meta.json so the learn folder is discoverable in the page tree (was missing, which is why ConditionalSidebar previously fell through to the default sidebar on /learn routes) - Add a static LearnHeader (book icon + "Learn") visually matching the Reference version selector, wired in via Sidebar's headerSlot - Rename the learn index page title to "Overview" so the landing page reads cleanly under the new header - Drop the redundant `h-6` spacer in Sidebar — every header component (IntegrationSelector, VersionSelector, LearnHeader) already supplies its own `mb-3`, and the spacer was producing a 24px phantom gap on /learn while collapsing to 0 on /reference under flex shrink Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
724 B
TypeScript
19 lines
724 B
TypeScript
"use client";
|
|
|
|
import { BookOpenIcon } from "lucide-react";
|
|
|
|
const LearnHeader = () => {
|
|
return (
|
|
<div className="flex justify-between items-center p-2 mt-3 mb-3 w-full h-12 rounded-lg border bg-[#BEC2FF33] dark:bg-[#7076D533] border-[#7076D5] dark:border-[#BEC2FF] [box-shadow:0px_17px_12px_-10px_rgba(112,118,213,0.3)]">
|
|
<div className="flex gap-2 items-center">
|
|
<div className="flex justify-center items-center w-8 h-8 shrink-0 rounded-md bg-[#BEC2FF] dark:bg-[#7076D5]">
|
|
<BookOpenIcon className="w-4 h-4 text-[#0C1112] dark:text-white" />
|
|
</div>
|
|
<span className="text-sm font-medium text-foreground">Learn</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default LearnHeader;
|