Remove collapsible behavior from sidebar Work and Company sections
The sidebar sections no longer fold/unfold — they are always visible. Removed Collapsible component, chevron icon, and open/close state. PAP-38 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,40 +1,17 @@
|
|||||||
import { ChevronRight, type LucideIcon } from "lucide-react";
|
import type { ReactNode } from "react";
|
||||||
import { useState, type ReactNode } from "react";
|
|
||||||
import { cn } from "../lib/utils";
|
|
||||||
import {
|
|
||||||
Collapsible,
|
|
||||||
CollapsibleContent,
|
|
||||||
CollapsibleTrigger,
|
|
||||||
} from "@/components/ui/collapsible";
|
|
||||||
|
|
||||||
interface SidebarSectionProps {
|
interface SidebarSectionProps {
|
||||||
label: string;
|
label: string;
|
||||||
icon?: LucideIcon;
|
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
defaultOpen?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SidebarSection({
|
export function SidebarSection({ label, children }: SidebarSectionProps) {
|
||||||
label,
|
|
||||||
children,
|
|
||||||
defaultOpen = true,
|
|
||||||
}: SidebarSectionProps) {
|
|
||||||
const [open, setOpen] = useState(defaultOpen);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Collapsible open={open} onOpenChange={setOpen}>
|
<div>
|
||||||
<CollapsibleTrigger className="flex items-center justify-between w-full px-3 py-1.5 text-[10px] font-medium uppercase tracking-widest font-mono text-muted-foreground/60 hover:text-muted-foreground transition-colors">
|
<div className="px-3 py-1.5 text-[10px] font-medium uppercase tracking-widest font-mono text-muted-foreground/60">
|
||||||
{label}
|
{label}
|
||||||
<ChevronRight
|
</div>
|
||||||
className={cn(
|
<div className="flex flex-col gap-0.5 mt-0.5">{children}</div>
|
||||||
"h-3 w-3 transition-transform",
|
</div>
|
||||||
open && "rotate-90"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</CollapsibleTrigger>
|
|
||||||
<CollapsibleContent>
|
|
||||||
<div className="flex flex-col gap-0.5 mt-0.5">{children}</div>
|
|
||||||
</CollapsibleContent>
|
|
||||||
</Collapsible>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user