mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:39:45 +00:00
перенес структуру Севы со своими правками
This commit is contained in:
1 parent
3a1cac0dfe
commit
808d97eb4b
331 files changed
+12260
-19950
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { useContext } from "react";
|
||||
|
||||
import { SliderContext } from "../Slider";
|
||||
import Dot from "./Dots";
|
||||
|
||||
function Dots() {
|
||||
const { slidesCount } = useContext(SliderContext);
|
||||
|
||||
const renderDots = () => {
|
||||
const dots = [];
|
||||
for (let i = 0; i < slidesCount; i++) {
|
||||
dots.push(<Dot key={`dot-${i}`} number={i} />);
|
||||
}
|
||||
|
||||
return dots;
|
||||
};
|
||||
|
||||
return <div className="dots">{renderDots()}</div>;
|
||||
}
|
||||
|
||||
export default Dots;
|
||||
Reference in new issue
Block a user