mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Set breakpoint for the sidebar so that it hides by default when the page width is too small to show it with the content and keep the width of the content constant on small screens while sliding the sidebar out to prevent it getting crushed.
19 lines
518 B
React
19 lines
518 B
React
import React from "react";
|
|
import { Link } from "react-router-dom";
|
|
import { Layout, Menu, Breadcrumb, Typography } from "antd";
|
|
|
|
const { Content } = Layout;
|
|
|
|
export default function PageLayout(props) {
|
|
return <>
|
|
<Breadcrumb className="site-breadcrumb">
|
|
{props.nav.map((part, index) => <Breadcrumb.Item key={index}>
|
|
{part.path ? <Link to={part.path}>{part.name}</Link> : part.name}
|
|
</Breadcrumb.Item>)}
|
|
</Breadcrumb>
|
|
<Content className="site-layout-content" >
|
|
{props.children}
|
|
</Content>
|
|
</>;
|
|
}
|