Skip to content

Commit 53b20c4

Browse files
committed
chore(website): Use temporary layout on desktop in dev mode to get more screen space
1 parent 9663ae8 commit 53b20c4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • packages/documentation/src/components/Layout

packages/documentation/src/components/Layout/Layout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ConfiguredIcons } from "@react-md/icon";
99
import {
1010
Configuration,
1111
Layout as RMDLayout,
12+
LayoutConfiguration,
1213
useLayoutNavigation,
1314
} from "@react-md/layout";
1415
import {
@@ -67,6 +68,15 @@ const icons: ConfiguredIcons = {
6768
sort: <ArrowUpwardSVGIcon />,
6869
};
6970

71+
let devLayoutConf: LayoutConfiguration | undefined;
72+
if (process.env.NODE_ENV !== "production") {
73+
devLayoutConf = {
74+
landscapeTabletLayout: "temporary",
75+
desktopLayout: "temporary",
76+
largeDesktopLayout: "temporary",
77+
};
78+
}
79+
7080
export default function Layout({
7181
children,
7282
title,
@@ -120,6 +130,7 @@ export default function Layout({
120130
LinkUnstyled
121131
)}
122132
navHeaderProps={{ children: <NavHeaderTitle /> }}
133+
{...devLayoutConf}
123134
>
124135
<TableOfContents pathname={pathname} />
125136
<Provider value={setElevated}>{children}</Provider>

0 commit comments

Comments
 (0)