Created
October 11, 2019 09:20
-
-
Save koss-lebedev/8303a05ae65093042535a069c9be098a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const movies = [ | |
"/breaking-bad.webp", | |
"/the-leftovers.jpg", | |
"/game-of-thrones.jpg", | |
"/true-detective.jpg", | |
"/walking-dead.jpg" | |
]; | |
const App = () => { | |
return ( | |
<> | |
<div className="container"> | |
{movies.map(src => ( | |
<div | |
key={src} | |
className="card" | |
style={{ | |
backgroundImage: `url(${src})` | |
}} | |
/> | |
))} | |
</div> | |
</> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment