Download react-slick/examples/AdaptiveHeight.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-slick/examples/AdaptiveHeight.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-slick/examples/AdaptiveHeight.js
-
curl -L -o AdaptiveHeight.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-slick/examples/AdaptiveHeight.js
771 Bytes
| import React from "react"; | |
| import Slider from "react-slick"; | |
| function AdaptiveHeight() { | |
| const settings = { | |
| className: "", | |
| dots: true, | |
| infinite: true, | |
| slidesToShow: 1, | |
| slidesToScroll: 1, | |
| adaptiveHeight: true | |
| }; | |
| return ( | |
| <div className="slider-container"> | |
| <Slider {...settings}> | |
| <div> | |
| <h3>1</h3> | |
| </div> | |
| <div> | |
| <h3>2</h3> | |
| <p>Hello</p> | |
| </div> | |
| <div> | |
| <h3>3</h3> | |
| <p>See ....</p> | |
| <p>Height is adaptive</p> | |
| </div> | |
| <div> | |
| <h3>4</h3> | |
| </div> | |
| <div> | |
| <h3>5</h3> | |
| </div> | |
| <div> | |
| <h3>6</h3> | |
| </div> | |
| </Slider> | |
| </div> | |
| ); | |
| } | |
| export default AdaptiveHeight; | |