Constraint PageLayout to max 1220px on large resolutions (#1919)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2022-04-28 14:34:29 -07:00
committed by GitHub
parent 566fb27fc1
commit 0e5147bb1d
2 changed files with 10 additions and 3 deletions

View File

@@ -1212,7 +1212,7 @@ const ListObjects = ({
onClosePreview={closePreviewWindow}
/>
)}
<PageLayout>
<PageLayout variant={"full"}>
<Grid item xs={12} className={classes.screenTitleContainer}>
<ScreenTitle
className={classes.screenTitle}

View File

@@ -13,14 +13,21 @@ const styles = (theme: Theme) =>
type PageLayoutProps = {
className?: string;
classes?: any;
variant?: "constrained" | "full";
children: any;
};
const PageLayout = ({ classes, className = "", children }: PageLayoutProps) => {
const PageLayout = ({
classes,
className = "",
children,
variant = "constrained",
}: PageLayoutProps) => {
let style = variant === "constrained" ? { maxWidth: 1220 } : {};
return (
<div className={classes.contentSpacer}>
<Grid container>
<Grid item xs={12} className={className}>
<Grid item xs={12} className={className} style={style}>
{children}
</Grid>
</Grid>