const Task = ({ categories }) => {
const handle = (e) => console.log(e)
const template = `
<ul class="categories">
${
categories.map(item => {
return `
<li class="category__item">
<div class="icon close-icon" onclick="${handle}"></div>
<span class="title">${item.title}</span>
</li>
`
}).join('')
}
</ul>
`
return template
}
export default Task