I have the following code below which is meant to show the "NoBillsLaptopPNG.src" on the screen, but no image is being rendered.
The images are being imported fine, but not sure why the image is not being displayed.
import NoBillsMobilePNG from "../../public/assets/quotes/no-bills-mobile.png"
import NoBillsLaptopPNG from "../../public/assets/quotes/no-bills-laptop.png"
export const NoBillsSummary = () => {
return <div>
<TestImg
NoBillsMobilePNG={NoBillsMobilePNG.src}
NoBillsLaptopPNG={NoBillsLaptopPNG.src}
></TestImg>
</div>;
};
const TestImg = styled.img<{
NoBillsMobilePNG: string;
NoBillsLaptopPNG: string;
}>`
// the reason the img is being passed in as props as media query will later be added to switch between images
src: url(${(NoBillsLaptopPNG) => NoBillsLaptopPNG.src});
width : 126.07px;
height : 107.59px;
margin-top: 2px;
`;