mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
refactor: enhance layout structure by introducing WorkspacePanel and updating component styles
This commit is contained in:
parent
bd1d1c42a7
commit
a49ee05456
6 changed files with 107 additions and 62 deletions
28
surfsense_web/components/layout/ui/shell/WorkspacePanel.tsx
Normal file
28
surfsense_web/components/layout/ui/shell/WorkspacePanel.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import type { ReactNode } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface WorkspacePanelProps {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
contentClassName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Full workspace area to the right of the left rail/sidebar.
|
||||
* Use this when a route should own the whole workspace instead of rendering
|
||||
* inside the normal TabBar/Header/main/right-panel chrome.
|
||||
*/
|
||||
export function WorkspacePanel({ children, className, contentClassName }: WorkspacePanelProps) {
|
||||
return (
|
||||
<main
|
||||
className={cn(
|
||||
"relative isolate flex min-w-0 flex-1 flex-col overflow-hidden bg-panel",
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div className="flex min-h-0 flex-1 items-center justify-center overflow-auto px-4 py-8">
|
||||
<div className={cn("w-full max-w-md", contentClassName)}>{children}</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue