Skip to content

Commit

Permalink
chore: portal and swiper position issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Chef-Yogi committed Nov 4, 2024
1 parent 28bd178 commit b125161
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 1 addition & 10 deletions apps/web/src/components/AdPanel/CardLayouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ const FloatingContainer = styled(Box)`
height: 100vh;
`

const Wrapper = styled.div`
position: absolute;
bottom: 30px;
right: 30px;
width: 100%;
`

const MobileContainer = styled(Box)`
border: 1px solid red;
width: 100%;
Expand Down Expand Up @@ -60,9 +53,7 @@ export const DesktopCard = () => {
return portalRoot && isDesktop
? createPortal(
<FloatingContainer>
<Wrapper>
<AdSlides />
</Wrapper>
<AdSlides />
</FloatingContainer>,
portalRoot,
)
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/components/AdPanel/CarrouselWithSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import 'swiper/css/pagination'
import { Swiper } from 'swiper/react'

export const StyledSwiper = styled(Swiper)`
position: relative;
position: absolute;
right: 30px;
bottom: 30px;
overflow: visible;
opacity: 0;
animation: ${appearAnimation} 0.3s ease-in-out 0.7s forwards;
width: 328px;
margin: 0;
.swiper-pagination {
position: absolute;
left: 50%;
Expand Down

0 comments on commit b125161

Please sign in to comment.