Skip to content

Instantly share code, notes, and snippets.

@ryanjyost
Created January 31, 2019 02:58
Show Gist options
  • Select an option

  • Save ryanjyost/ebac94f92af7482c188ff5bcd51d8630 to your computer and use it in GitHub Desktop.

Select an option

Save ryanjyost/ebac94f92af7482c188ff5bcd51d8630 to your computer and use it in GitHub Desktop.
import React from "react";
const Content = ({ styles }) => {
const dummyPost = {
title: `Here's a blog post title`,
summary:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
};
const posts = Array(20).fill(dummyPost);
const contentStyle = {
paddingTop: styles.topBarHeight + 20,
paddingRight: 20,
paddingBottom: styles.footerMenuHeight + 20,
paddingLeft: 20
};
return (
<div style={contentStyle}>
{posts.map((post, i) => {
return (
<div key={i} style={{ marginBottom: 40 }}>
<h2 style={{ marginBottom: 0 }}>{post.title}</h2>
<p>{post.summary}</p>
</div>
);
})}
</div>
);
};
export default Content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment