refactor(web): extract split layout for variable inspect

- add SplitPanel to share left/right shell and narrow menu handling
- reuse InspectHeaderProps for tab header + actions across tabs
- refactor variables/artifacts tabs to plug into shared split layout
- align right-side header/close behavior and consolidate empty/loading flows
This commit is contained in:
yyh
2026-01-28 14:03:58 +08:00
parent 40a8e8febc
commit 0b6522df42
6 changed files with 365 additions and 344 deletions

View File

@ -4,11 +4,14 @@ import { RiCloseLine } from '@remixicon/react'
import ActionButton from '@/app/components/base/action-button'
import TabHeader from './tab-header'
type InspectLayoutProps = {
export type InspectHeaderProps = {
activeTab: InspectTab
onTabChange: (tab: InspectTab) => void
onClose: () => void
headerActions?: ReactNode
}
type InspectLayoutProps = InspectHeaderProps & {
children: ReactNode
}
@ -31,7 +34,7 @@ const InspectLayout: FC<InspectLayoutProps> = ({
</ActionButton>
</div>
</div>
<div className="min-h-0 flex-1">
<div className="flex min-h-0 flex-1 flex-col">
{children}
</div>
</div>