I have an array of objects.
Within my React Component, I've written a block of HTML code:
<div class="item">
<div class="card card--big">
<div class="card__cover">
<img src="img/covers/cover2.jpg" alt="" />
<a href="#" class="card__play">
<i class="icon ion-ios-play"></i>
</a>
</div>
<div class="card__content">
<h3 class="card__title"><a href="#">Benched</a></h3>
<span class="card__category">
<a href="#">Comedy</a>
</span>
<span class="card__rate"><i class="icon ion-ios-star"></i>7.1</span>
</div>
</div>
</div>
If I manually paste it - everything works great, but if I use Array.map, the styles are lost (the card size is incorrect).
const elements = content.map((content, index) => {
return (
<div class="item">
<div class="card card--big">
<div class="card__cover">
<img src="img/covers/cover2.jpg" alt="" />
<a href="#" class="card__play">
<i class="icon ion-ios-play"></i>
</a>
</div>
<div class="card__content">
<h3 class="card__title"><a href="#">Benched</a></h3>
<span class="card__category">
<a href="#">Comedy</a>
</span>
<span class="card__rate"><i class="icon ion-ios-star"></i>7.1</span>
</div>
</div>
</div>
);
});
How can I fix this issue?