Skip to content

Instantly share code, notes, and snippets.

@jaredly
Created July 22, 2014 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredly/60592d2f3ce9263627ae to your computer and use it in GitHub Desktop.
Save jaredly/60592d2f3ce9263627ae to your computer and use it in GitHub Desktop.
var rows = [];
for (var i=0; i<items.length; i+=2){
rows.push(<div className="parent-row">
<div className="parent-card">
{items[i]}
</div>
<div className="parent-card">
{items[i+1]}
</div>
</div>)
}
.parent-row {
display: flex;
align-items: stretch;
}
.parent-card {
flex: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment