Skip to content

Instantly share code, notes, and snippets.

@peaceintheheart
Created July 10, 2020 01:50
Show Gist options
  • Save peaceintheheart/302393c838f431cec0b948a19a69a2a8 to your computer and use it in GitHub Desktop.
Save peaceintheheart/302393c838f431cec0b948a19a69a2a8 to your computer and use it in GitHub Desktop.
import React from 'react';
import Card from './Card';
function List (props) {
const { header, listCards, } = props;
const individualCards = listCards.map((card) => {
return <Card cardTitle={card.title} cardContent={card.content} />;
});
console.log(individualCards);
return (
<section className="List">
<header className="List-header">
<h2>{header}</h2>
<div className="List-cards">
{individualCards}
</div>
</header>
</section>
);
}
export default List;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment