From 313ff79116065eb7e2a20c4e7d19ec6f2d360571 Mon Sep 17 00:00:00 2001 From: Travis Kohlbeck Date: Sun, 22 Dec 2019 16:05:24 -0500 Subject: [PATCH] adds back original padding when masonry disabled --- src/pages/Home.tsx | 20 +++++++++++--------- src/pages/PageLayout.styles.tsx | 16 ++++++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 7a3aced..062e39c 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -158,9 +158,13 @@ class HomePage extends Component { render() { const { classes } = this.props; - + const containerClasses = `${classes.pageLayoutMaxConstraints}${ + this.state.isMasonryLayout + ? ' ' + classes.pageLayoutMasonry + : '' + }`; return ( -
+
{this.state.backlogPosts ? (
@@ -216,13 +220,11 @@ class HomePage extends Component {
{this.state.posts.map((post: Status) => { return ( -
- -
+ ); })}
diff --git a/src/pages/PageLayout.styles.tsx b/src/pages/PageLayout.styles.tsx index e573f7c..8d0c670 100644 --- a/src/pages/PageLayout.styles.tsx +++ b/src/pages/PageLayout.styles.tsx @@ -33,22 +33,22 @@ export const styles = (theme: Theme) => marginLeft: 250, marginTop: 88, padding: theme.spacing.unit * 3, - paddingLeft: theme.spacing.unit * 3, - paddingRight: theme.spacing.unit * 3 + paddingLeft: theme.spacing.unit * 16, + paddingRight: theme.spacing.unit * 16, }, [theme.breakpoints.up("lg")]: { marginLeft: 250, marginTop: 88, padding: theme.spacing.unit * 3, - paddingLeft: theme.spacing.unit * 3, - paddingRight: theme.spacing.unit * 3 + paddingLeft: theme.spacing.unit * 32, + paddingRight: theme.spacing.unit * 32, }, [theme.breakpoints.up("xl")]: { marginLeft: 250, marginTop: 88, padding: theme.spacing.unit * 3, - paddingLeft: theme.spacing.unit * 3, - paddingRight: theme.spacing.unit * 3 + paddingLeft: theme.spacing.unit * 40, + paddingRight: theme.spacing.unit * 40, }, backgroundColor: theme.palette.background.default, minHeight: isDarwinApp() ? "100vh" : "auto" @@ -324,6 +324,10 @@ export const styles = (theme: Theme) => }, backgroundColor: theme.palette.primary.main }, + pageLayoutMasonry: { + paddingLeft: theme.spacing.unit * 3, + paddingRight: theme.spacing.unit * 3, + }, masonryGrid: { display: 'flex', width: 'auto',