"use client"; import React, { useState } from 'react'; import { ChevronLeft, ChevronRight } from 'lucide-react'; import { cn } from '@/lib/utils'; interface CollapsibleSidebarProps { children: React.ReactNode; className?: string; initialExpanded?: boolean; } export function CollapsibleSidebar({ children, className, initialExpanded = true }: CollapsibleSidebarProps) { const [isExpanded, setIsExpanded] = useState(initialExpanded); return (
{ if (!isExpanded) setIsExpanded(true); }} > {/* Toggle Button */} {isExpanded && ( )} {/* Content Container */}
{children}
); }