You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here my code
import React, { useState } from "react";
import { useKeenSlider } from "keen-slider/react";
import "keen-slider/keen-slider.min.css";
import Slider from "@mui/material/Slider";
import "./styles.scss";
Here my code
import React, { useState } from "react";
import { useKeenSlider } from "keen-slider/react";
import "keen-slider/keen-slider.min.css";
import Slider from "@mui/material/Slider";
import "./styles.scss";
const KeenSlider = () => {
const [currentSlide, setCurrentSlide] = useState(0);
const [loaded, setLoaded] = useState(false);
const [rangeValue, setRangeValue] = useState(0);
const [sliderRef, instanceRef] = useKeenSlider({
initial: 0,
drag: true,
slideChanged(slider) {
setCurrentSlide(slider.track.details.rel);
},
created() {
setLoaded(true);
},
});
const slideContents = [
{ number: "1", description: "Question 1 description" },
{ number: "2", description: "Question 2 description" },
{ number: "3", description: "Question 3 description" },
{ number: "4", description: "Question 4 description" },
{ number: "5", description: "Question 5 description" },
{ number: "6", description: "Question 6 description" },
];
return (
<>
{slideContents.map((content, index) => (
<div key={index} className={
keen-slider__slide number-slide
}>{content.number} из {slideContents.length}
);
};
export default KeenSlider;
The text was updated successfully, but these errors were encountered: