File size: 861 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
import React from "react";
import Slider from "react-slick";
function VariableWidth() {
const settings = {
className: "slider variable-width",
dots: true,
infinite: true,
centerMode: true,
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true
};
return (
<div className="slider-container">
<Slider {...settings}>
<div style={{ width: 100 }}>
<p>100</p>
</div>
<div style={{ width: 200 }}>
<p>200</p>
</div>
<div style={{ width: 75 }}>
<p>75</p>
</div>
<div style={{ width: 300 }}>
<p>300</p>
</div>
<div style={{ width: 225 }}>
<p>225</p>
</div>
<div style={{ width: 175 }}>
<p>175</p>
</div>
</Slider>
</div>
);
}
export default VariableWidth;
|