mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-29 19:33:34 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
|
|
import { ResizableHandle, ResizablePanel, cn } from 'ui'
|
|
|
|
// Having these params as props as otherwise it's quite hard to visually check the sizes in DefaultLayout
|
|
// as react resizeable panels requires all these values to be valid to render correctly
|
|
interface LayoutSidebarProps {
|
|
order?: number
|
|
minSize?: number
|
|
maxSize?: number
|
|
defaultSize?: number
|
|
}
|
|
|
|
export const LayoutSidebar = ({
|
|
order = 2,
|
|
minSize = 30,
|
|
maxSize = 50,
|
|
defaultSize = 30,
|
|
}: LayoutSidebarProps) => {
|
|
const { activeSidebar } = useSidebarManagerSnapshot()
|
|
|
|
if (!activeSidebar?.component) return null
|
|
|
|
return (
|
|
<>
|
|
<ResizableHandle withHandle />
|
|
<ResizablePanel
|
|
id="panel-side"
|
|
key={activeSidebar?.id ?? 'default'}
|
|
order={order}
|
|
defaultSize={defaultSize}
|
|
minSize={minSize}
|
|
maxSize={maxSize}
|
|
className={cn(
|
|
'border-l bg fixed z-40 right-0 top-0 bottom-0',
|
|
'h-[100dvh]',
|
|
'md:absolute md:h-auto md:w-1/2',
|
|
'lg:w-2/5',
|
|
'xl:relative xl:border-l-0'
|
|
)}
|
|
>
|
|
{activeSidebar?.component()}
|
|
</ResizablePanel>
|
|
</>
|
|
)
|
|
}
|