eolas-app/src/containers/Entry.tsx
thomasabishop 4c6a4d619f
All checks were successful
Deploy eolas-app / deploy (push) Successful in 54s
style: tweak bottom drawer height aaagain
2025-12-05 19:43:41 +00:00

28 lines
1.2 KiB
TypeScript

import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"
import EntryBody from "@/components/EntryBody"
import EntryMetadata from "@/containers/EntryMetadata"
import { useIsMobile } from "@/hooks/use-mobile"
export default function Entry({ entryTitle, entryBody, history, metadata, isLoading }) {
const isMobile = useIsMobile()
const topPanelSize = isMobile ? 80 : 75
const bottomPanelSize = isMobile ? 20 : 25
const handleSize = isMobile ? "5px" : "1px"
return (
<ResizablePanelGroup direction="vertical" className="w-full h-full">
<ResizablePanel defaultSize={topPanelSize}>
<div className="h-full overflow-auto">
<EntryBody body={entryBody} isLoading={isLoading} />
</div>
</ResizablePanel>
<ResizableHandle withHandle style={{ height: handleSize }} />
<ResizablePanel key={`bottom-${bottomPanelSize}`} defaultSize={bottomPanelSize}>
<div className="h-full overflow-auto">
<EntryMetadata entryTitle={entryTitle} history={history} metadata={metadata} />
</div>
</ResizablePanel>
</ResizablePanelGroup>
)
}