mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
only show sidebar resizer when sidebar is actually shown
This commit is contained in:
@@ -157,28 +157,30 @@ export default function Layout(props: LayoutProps) {
|
|||||||
<Box className={classes.sidebarContent}>{props.sidebar}</Box>
|
<Box className={classes.sidebarContent}>{props.sidebar}</Box>
|
||||||
</AppShell.Section>
|
</AppShell.Section>
|
||||||
</AppShell.Navbar>
|
</AppShell.Navbar>
|
||||||
<Draggable
|
<OnDesktop>
|
||||||
axis="x"
|
<Draggable
|
||||||
defaultPosition={{
|
axis="x"
|
||||||
x: sidebarWidth,
|
defaultPosition={{
|
||||||
y: Constants.layout.headerHeight,
|
x: sidebarWidth,
|
||||||
}}
|
y: Constants.layout.headerHeight,
|
||||||
bounds={{
|
|
||||||
left: 120,
|
|
||||||
right: 1000,
|
|
||||||
}}
|
|
||||||
grid={[30, 30]}
|
|
||||||
onDrag={(_e, data) => setSidebarWidth(data.x)}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
position: "fixed",
|
|
||||||
height: "100%",
|
|
||||||
width: "10px",
|
|
||||||
cursor: "ew-resize",
|
|
||||||
}}
|
}}
|
||||||
></Box>
|
bounds={{
|
||||||
</Draggable>
|
left: 120,
|
||||||
|
right: 1000,
|
||||||
|
}}
|
||||||
|
grid={[30, 30]}
|
||||||
|
onDrag={(_e, data) => setSidebarWidth(data.x)}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
style={{
|
||||||
|
position: "fixed",
|
||||||
|
height: "100%",
|
||||||
|
width: "10px",
|
||||||
|
cursor: "ew-resize",
|
||||||
|
}}
|
||||||
|
></Box>
|
||||||
|
</Draggable>
|
||||||
|
</OnDesktop>
|
||||||
|
|
||||||
<AppShell.Main id="content">
|
<AppShell.Main id="content">
|
||||||
<Suspense fallback={<Loader />}>
|
<Suspense fallback={<Loader />}>
|
||||||
|
|||||||
Reference in New Issue
Block a user