I'm currently attempting to pass a background image using a prop, but I'm encountering an issue where it's indicating that url
is undefined.
const CardImage = styled.div`
height: auto;
width: 100%;
background-size: contain;
background: url(${props => props.data.url});
`
function Card(props) {
return (
<CardImage/>
)
}
<Card data={{url: "https://via.placeholder.com/150x150", text: "test"}}/>