Skip to content

Commit f1dfa8a

Browse files
committed
auto carousel on mobile view
Signed-off-by: Huzaif Mushtaq <huzaaifmushtaq@gmail.com>
1 parent 1c1a36a commit f1dfa8a

1 file changed

Lines changed: 7 additions & 28 deletions

File tree

src/sections/Devrel-platform/picture-slider.js

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import React from "react";
32
import Slider from "react-slick";
43
import styled from "styled-components";
@@ -16,7 +15,6 @@ const PictureSliderWrapper = styled.div`
1615
1716
.slick-slider {
1817
margin-top: 1rem;
19-
height: 100%;
2018
width: 100%;
2119
2220
.slick-list {
@@ -29,30 +27,15 @@ const PictureSliderWrapper = styled.div`
2927
color: ${(props) => props.theme.tertiaryColor};
3028
}
3129
}
30+
}
3231
33-
@media (max-width: 36rem) {
34-
overflow: hidden;
35-
position: relative;
36-
37-
.slick-prev,
38-
.slick-next {
39-
z-index: 2;
40-
width: 24px;
41-
height: 24px;
42-
43-
&:before {
44-
font-size: 20px;
45-
color: black;
46-
}
47-
}
48-
49-
.slick-prev {
50-
left: 10px !important;
51-
}
32+
@media (max-width: 36rem) {
33+
overflow: hidden;
34+
position: relative;
5235
53-
.slick-next {
54-
right: 10px !important;
55-
}
36+
.slick-prev,
37+
.slick-next {
38+
display: none !important;
5639
}
5740
}
5841
@@ -61,7 +44,6 @@ const PictureSliderWrapper = styled.div`
6144
6245
.slick-slide {
6346
display: flex;
64-
height: auto;
6547
align-items: center;
6648
justify-content: center;
6749
@@ -74,7 +56,6 @@ const PictureSliderWrapper = styled.div`
7456
}
7557
`;
7658

77-
7859
const PictureSlider = () => {
7960
const data = [ChallangePNG, TutorialPNG, DesignPNG];
8061
const settings = {
@@ -99,5 +80,3 @@ const PictureSlider = () => {
9980
};
10081

10182
export default PictureSlider;
102-
103-

0 commit comments

Comments
 (0)