<PSmall>
<img src={images[1]} />
<img src={images[2]} />
<img src={images[3]} />
</PSmall>
we have a styled component PSmall. It is necessary to make dynamic imgs instead of statically created ones, the number of which will depend on the number of elements in the image array. I.e. I receive an array with 5 elements and 5 img elements with the images[i] attribute should appear. One possible way is to create div and apply background img to them. but how to set src then. and how to choose the right path for them.\
const CreateDiv = (array:string[]) => {
if(array.length > 1){
for (let i =1; i<(array.length-1); i++){
let create = document.createElement('div');
create.className='img';
document.appendChild(create);
}
}