Created
July 10, 2020 01:50
-
-
Save peaceintheheart/302393c838f431cec0b948a19a69a2a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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