-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from Beside-Potenday/seungbeom
feat: 모바일 살펴보기 swiper 추가
- Loading branch information
Showing
4 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/components/HomePage/Contents.tsx → ...mponents/HomePage/LookAround/Contents.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from 'react'; | ||
import { Swiper, SwiperSlide } from 'swiper/react'; | ||
import styled from '@emotion/styled'; | ||
import { Pagination, Autoplay, Navigation } from 'swiper/modules'; | ||
|
||
import 'swiper/css'; | ||
import 'swiper/css/pagination'; | ||
import 'swiper/css/autoplay'; | ||
import 'swiper/css/navigation'; | ||
|
||
export const MobileSwiper = () => { | ||
return ( | ||
<> | ||
<SwiperWrapper | ||
modules={[Pagination, Autoplay, Navigation]} | ||
pagination={{ clickable: true }} | ||
autoplay={{ delay: 3000 }} | ||
navigation | ||
> | ||
<SwiperSlide> | ||
<SlideContent> | ||
<img src="/images/composition1.svg" alt="살펴보기 이미지 1" /> | ||
</SlideContent> | ||
</SwiperSlide> | ||
<SwiperSlide> | ||
<SlideContent> | ||
<img src="/images/composition2.svg" alt="살펴보기 이미지 2" /> | ||
</SlideContent> | ||
</SwiperSlide> | ||
<SwiperSlide> | ||
<SlideContent> | ||
<img src="/images/composition3.svg" alt="살펴보기 이미지 3" /> | ||
</SlideContent> | ||
</SwiperSlide> | ||
</SwiperWrapper> | ||
</> | ||
); | ||
}; | ||
|
||
const SwiperWrapper = styled(Swiper)` | ||
width: 100%; | ||
height: 100%; | ||
`; | ||
|
||
const SlideContent = styled.div` | ||
text-align: center; | ||
font-size: 18px; | ||
/* Center slide text vertically */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters