Untitled
8 months ago in JavaScript
import React from 'react';
import Card from './card';
const cardsItems=[
{id: 1, title: "Card title 1", description: "Description 1"},
{id: 2, title: "Card title 2", description: "Description 2"},
{id: 3, title: "Card title 3", description: "Description 3"},
];
const cards = () => {
return (
cardsItems.map(item =>
<Card
key={item.id}
title={item.title}
description={item.description}
/>
)
);
};
export default cards;