l-min-components 1.0.1094 → 1.0.1095
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useRef } from "react";
|
|
2
|
-
import { DevBannerWrapper } from "./styles";
|
|
2
|
+
import { DevBannerWrapper, DotHolder } from "./styles";
|
|
3
3
|
import BannerImg from "./assets/book.png";
|
|
4
4
|
import BannerImg2 from "./assets/pack.png";
|
|
5
5
|
import BannerImg3 from "./assets/globe.png";
|
|
@@ -29,12 +29,27 @@ const DeveloperBanner = ({ findText }) => {
|
|
|
29
29
|
// pauseOnHover: true
|
|
30
30
|
// };
|
|
31
31
|
const ref = useRef();
|
|
32
|
+
|
|
33
|
+
// function to create slider dots
|
|
34
|
+
const createDots = ({ totalSlides, currentSlide }) => {
|
|
35
|
+
console.log(totalSlides, "lala");
|
|
36
|
+
let arr = [];
|
|
37
|
+
for (let index = 1; index <= totalSlides; index++) {
|
|
38
|
+
arr.push(index);
|
|
39
|
+
}
|
|
40
|
+
return arr.map((item) => {
|
|
41
|
+
return (
|
|
42
|
+
<span className={item === currentSlide + 1 ? "active" : ""}></span>
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
32
47
|
return (
|
|
33
48
|
<DevBannerWrapper>
|
|
34
49
|
<CarouselProvider
|
|
35
50
|
totalSlides={3}
|
|
36
51
|
naturalSlideWidth={232}
|
|
37
|
-
naturalSlideHeight={
|
|
52
|
+
naturalSlideHeight={590}
|
|
38
53
|
visibleSlides={1}
|
|
39
54
|
infinite
|
|
40
55
|
// isIntrinsicHeight={true}
|
|
@@ -154,9 +169,7 @@ const DeveloperBanner = ({ findText }) => {
|
|
|
154
169
|
</Slider>
|
|
155
170
|
<DotGroup
|
|
156
171
|
renderDots={(e) => {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return <span>1</span>;
|
|
172
|
+
return <DotHolder>{createDots(e)}</DotHolder>;
|
|
160
173
|
}}
|
|
161
174
|
/>
|
|
162
175
|
</CarouselProvider>
|
|
@@ -181,3 +181,29 @@ export const DevBannerWrapper = styled.div`
|
|
|
181
181
|
height: auto;
|
|
182
182
|
}
|
|
183
183
|
`;
|
|
184
|
+
|
|
185
|
+
export const DotHolder = styled.div`
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
gap: 10px;
|
|
190
|
+
position: absolute;
|
|
191
|
+
bottom: 20px;
|
|
192
|
+
left: 0;
|
|
193
|
+
right: 0;
|
|
194
|
+
margin: 0 auto;
|
|
195
|
+
> span {
|
|
196
|
+
width: 8px;
|
|
197
|
+
height: 8px;
|
|
198
|
+
background: #d9d9d9;
|
|
199
|
+
border-radius: 100%;
|
|
200
|
+
padding: 0;
|
|
201
|
+
transition: all 0.2s ease-in-out;
|
|
202
|
+
&.active {
|
|
203
|
+
background: #febf10;
|
|
204
|
+
width: 39px !important;
|
|
205
|
+
height: 5px !important;
|
|
206
|
+
border-radius: 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
`;
|