I was working on a E-commerce application. I was trying to show an overlay Sold Out over the item in my store. Here is my styled components
export const PreviewSoldOut = styled.div`
div {
grid-area: preview;
width: auto;
max-height: 560px;
object-fit: contain;
background-position: center;
background-image:
url("http://localhost:8000/media/products/saleordemoproduct_cuschion01.png");
img {
width: 100%;
object-fit: contain;
}
}
`;
Here is my react component
<S.PreviewSoldOut>
<img src={soldOutThumb}></img>
</S.PreviewSoldOut>
But it's showing only the overlay instead of showing over the product image

But I want like this where Sold Out would be over item image
