Is there a way to apply the css property background
inline in react?
I attempted to pass the following object without success:
let style = {
background:
`linear-gradient(
rgba(0, 0, 0, 0.6),
rgba(0, 0, 0, 0.6)
), url("${ place.imgUri }") no-repeat center center cover`
};
Note: It works when only including the url property.
The reason for this is because I need both a linear-gradient and a dynamic background-url.
When defining it through a css class rule, the inline-style overwrites it.
Edit: I am confused about why this question was marked as off-topic. If a css label solution is needed, please advise in the comments (?).