Skip to content

Instantly share code, notes, and snippets.

@jasonleehodges
Last active July 10, 2021 03:54
Show Gist options
  • Select an option

  • Save jasonleehodges/1e6b3e145de7793ed2393568e70b04c6 to your computer and use it in GitHub Desktop.

Select an option

Save jasonleehodges/1e6b3e145de7793ed2393568e70b04c6 to your computer and use it in GitHub Desktop.
import React from 'react';
export const Grid = (props) => {
const renderRow = (rowData) => (
<div className="row">
<div className="col">
{rowData.title}
</div>
<div className="col">
{rowData.description}
</div>
<div className="col">
{rowData.date}
</div>
</div>
)
return (
<div className="grid__container">
{props.data.map((datum) => renderRow(datum))}
</div>
)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment