File size: 841 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import React from 'react';
import { MdAdd } from 'react-icons/md';
import { Container } from './styles';
import Card from '../Card';
export default function List({ data, index: listIndex }) {
return (
<Container done={data.done}>
<header>
<h2>{data.title}</h2>
{data.creatable && (
<button type="button">
<MdAdd size={24} color='#FFF' />
</button>
)}
</header>
<ul>
{
data.cards.map((card, index) => <Card
key={card.id}
listIndex={listIndex}
index={index}
data={card}/>
)
}
</ul>
</Container>
);
}
|