mantaskaveckas / react-siema

ReactSiema Demo
https://kaveckas.github.io/react-siema/
89 stars 39 forks source link

Can't make a slide with background image #25

Open clearfram3 opened 5 years ago

clearfram3 commented 5 years ago

Here is the JSS:

sliderBox: {
  height: 600
},
slider: {
  height: 600,
  width: "100%"
},
slide: {
  backgroundPosition: "center center",
  backgroundRepeat: "no-repeat",
  backgroundSize: "cover",
  height: 600,
  width: "100%"
}

Here is the slider:

<ReactSiema
  {...options}
  ref={siema => (slider = siema)}
  className={classes.slider}
>
  {images.map((img, index) => (
    <div
        className={classes.slide}
        style={{ backgroundImage: `url(${img})` }}
     />
  ))}
</ReactSiema>

Any ideas?