I am facing an issue with the code below that is supposed to display the "NoBillsLaptopPNG.src" image on the screen, but for some reason, the image is not showing up.
The images are being imported correctly, so I'm unsure why the image is not appearing as expected.
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 src of the image is passed in as props because a media query will be added later to switch between images
src: url(${(NoBillsLaptopPNG) => NoBillsLaptopPNG.src});
width : 126.07px;
height : 107.59px;
margin-top: 2px;
`;