Got tab content scrolling working

This commit is contained in:
Gregory Schier
2023-03-11 22:36:13 -08:00
parent bdb877a936
commit d8cc075bd0
9 changed files with 60 additions and 59 deletions

View File

@@ -20,35 +20,33 @@ export function Workspace({ matches }: { path: string; matches?: Params }) {
const isH = width > 900;
return (
<div className="grid grid-cols-[auto_1fr] h-full text-gray-900 overflow-hidden">
<div className="grid grid-cols-[auto_1fr] h-full text-gray-900">
<Sidebar
requests={requests ?? []}
workspaceId={workspaceId}
activeRequestId={matches?.requestId}
/>
{request && (
<div className="h-full">
<div className="grid grid-rows-[auto_1fr] h-full overflow-hidden">
<HStack
as={WindowDragRegion}
className="px-3 bg-gray-50 text-gray-900 border-b border-b-gray-200 pt-[1px]"
alignItems="center"
>
{request.name}
</HStack>
<div
className={classnames(
'grid overflow-auto',
isH ? 'grid-cols-[1fr_1fr]' : 'grid-rows-[minmax(0,auto)_minmax(0,100%)]',
)}
>
<RequestPane
fullHeight={isH}
request={request}
className={classnames(!isH && 'pr-2 pb-0')}
/>
<ResponsePane requestId={request.id} />
</div>
<div className="grid grid-rows-[auto_minmax(0,1fr)] h-full">
<HStack
as={WindowDragRegion}
className="px-3 bg-gray-50 text-gray-900 border-b border-b-gray-200 pt-[1px]"
alignItems="center"
>
{request.name}
</HStack>
<div
className={classnames(
'grid overflow-auto',
isH ? 'grid-cols-[1fr_1fr]' : 'grid-rows-[minmax(0,auto)_minmax(0,100%)]',
)}
>
<RequestPane
fullHeight={isH}
request={request}
className={classnames(!isH && 'pr-2 pb-0')}
/>
<ResponsePane requestId={request.id} />
</div>
</div>
)}