Last active
October 4, 2018 11:21
-
-
Save DZuz14/97aa450a0afd056608ffa1db9227c4e1 to your computer and use it in GitHub Desktop.
Setting Background Image on Slide
This file contains hidden or 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
import React from 'react' | |
const Slide = ({ image }) => { | |
const styles = { | |
backgroundImage: `url(${image})`, | |
backgroundSize: 'cover', | |
backgroundRepeat: 'no-repeat', | |
backgroundPosition: '50% 60%' | |
} | |
return <div className="slide" style={styles}></div> | |
} | |
export default Slide |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment