Skip to content

Commit

Permalink
chore(website): Use temporary layout on desktop in dev mode to get mo…
Browse files Browse the repository at this point in the history
…re screen space
  • Loading branch information
mlaursen committed Jul 16, 2021
1 parent 9663ae8 commit 53b20c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/documentation/src/components/Layout/Layout.tsx
Expand Up @@ -9,6 +9,7 @@ import { ConfiguredIcons } from "@react-md/icon";
import {
Configuration,
Layout as RMDLayout,
LayoutConfiguration,
useLayoutNavigation,
} from "@react-md/layout";
import {
Expand Down Expand Up @@ -67,6 +68,15 @@ const icons: ConfiguredIcons = {
sort: <ArrowUpwardSVGIcon />,
};

let devLayoutConf: LayoutConfiguration | undefined;
if (process.env.NODE_ENV !== "production") {
devLayoutConf = {
landscapeTabletLayout: "temporary",
desktopLayout: "temporary",
largeDesktopLayout: "temporary",
};
}

export default function Layout({
children,
title,
Expand Down Expand Up @@ -120,6 +130,7 @@ export default function Layout({
LinkUnstyled
)}
navHeaderProps={{ children: <NavHeaderTitle /> }}
{...devLayoutConf}
>
<TableOfContents pathname={pathname} />
<Provider value={setElevated}>{children}</Provider>
Expand Down

0 comments on commit 53b20c4

Please sign in to comment.