style: reduce size of metadata drawer on mob
This commit is contained in:
parent
4d3567287a
commit
4fd6b6e6e9
1 changed files with 8 additions and 2 deletions
|
|
@ -1,8 +1,13 @@
|
||||||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"
|
||||||
import EntryBody from "@/components/EntryBody"
|
import EntryBody from "@/components/EntryBody"
|
||||||
import EntryMetadata from "@/containers/EntryMetadata"
|
import EntryMetadata from "@/containers/EntryMetadata"
|
||||||
|
import { useIsMobile } from "@/hooks/use-mobile"
|
||||||
|
|
||||||
export default function Entry({ entryTitle, entryBody, history, metadata, isLoading }) {
|
export default function Entry({ entryTitle, entryBody, history, metadata, isLoading }) {
|
||||||
|
const isMobile = useIsMobile()
|
||||||
|
const bottomPanelSize = isMobile ? 0 : 25
|
||||||
|
const handleSize = isMobile ? "5px" : "1px"
|
||||||
|
console.log(isMobile)
|
||||||
return (
|
return (
|
||||||
<ResizablePanelGroup direction="vertical" className="w-full h-full">
|
<ResizablePanelGroup direction="vertical" className="w-full h-full">
|
||||||
<ResizablePanel defaultSize={75}>
|
<ResizablePanel defaultSize={75}>
|
||||||
|
|
@ -10,8 +15,9 @@ export default function Entry({ entryTitle, entryBody, history, metadata, isLoad
|
||||||
<EntryBody body={entryBody} isLoading={isLoading} />
|
<EntryBody body={entryBody} isLoading={isLoading} />
|
||||||
</div>
|
</div>
|
||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
<ResizableHandle withHandle />
|
<ResizableHandle withHandle style={{ height: handleSize }} />
|
||||||
<ResizablePanel defaultSize={25}>
|
|
||||||
|
<ResizablePanel key={`bottom-${bottomPanelSize}`} defaultSize={bottomPanelSize}>
|
||||||
<div className="h-full overflow-auto">
|
<div className="h-full overflow-auto">
|
||||||
<EntryMetadata entryTitle={entryTitle} history={history} metadata={metadata} />
|
<EntryMetadata entryTitle={entryTitle} history={history} metadata={metadata} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue