diff --git a/apps/web/src/components/AdPanel/Content.tsx b/apps/web/src/components/AdPanel/BodyText.tsx similarity index 59% rename from apps/web/src/components/AdPanel/Content.tsx rename to apps/web/src/components/AdPanel/BodyText.tsx index c7ee4e9d2a6ae..5c712645dae9b 100644 --- a/apps/web/src/components/AdPanel/Content.tsx +++ b/apps/web/src/components/AdPanel/BodyText.tsx @@ -1,9 +1,9 @@ import { Text, TextProps } from '@pancakeswap/uikit' import { PropsWithChildren } from 'react' -interface ContentProps extends TextProps, PropsWithChildren {} +interface BodyTextProps extends TextProps, PropsWithChildren {} -export const Content = ({ children, ...props }: ContentProps) => { +export const BodyText = ({ children, ...props }: BodyTextProps) => { return ( {children} diff --git a/apps/web/src/components/AdPanel/Card.tsx b/apps/web/src/components/AdPanel/Card.tsx index 7c1d16ee5c327..6e841784e66fe 100644 --- a/apps/web/src/components/AdPanel/Card.tsx +++ b/apps/web/src/components/AdPanel/Card.tsx @@ -14,8 +14,10 @@ const BaseCard = styled(Box)` const Content = styled(Flex)` position: relative; width: 148px; + height: 110px; display: flex; flex-direction: column; + justify-content: space-between; z-index: 2; ` @@ -31,15 +33,15 @@ const GraphicsContainer = styled(Box)` z-index: 1; ` -const SliderContainer = styled(Box)` - position: absolute; - bottom: 16px; - left: 16px; +// const SliderContainer = styled(Box)` +// position: absolute; +// bottom: 16px; +// left: 16px; - width: 148px; - height: 4px; /* temporary */ - /* border: 1px solid gray; */ -` +// width: 148px; +// height: 4px; /* temporary */ +// /* border: 1px solid gray; */ +// ` const CloseButtonContainer = styled(Box)` position: absolute; @@ -73,7 +75,6 @@ export const AdCard = ({ children, imageUrl, alt }: AdCardProps) => { return ( {children} - diff --git a/apps/web/src/components/AdPanel/CarrouselWithSlider.tsx b/apps/web/src/components/AdPanel/CarrouselWithSlider.tsx index 5be97031e6a53..e86810bca4ea0 100644 --- a/apps/web/src/components/AdPanel/CarrouselWithSlider.tsx +++ b/apps/web/src/components/AdPanel/CarrouselWithSlider.tsx @@ -14,20 +14,24 @@ export const StyledSwiper = styled(Swiper)` position: absolute; right: 30px; bottom: 30px; + width: 328px; overflow: visible; opacity: 0; - animation: ${appearAnimation} 0.3s ease-in-out 0.7s forwards; - width: 328px; margin: 0; + animation: ${appearAnimation} 0.3s ease-in-out 0.7s forwards; + .swiper-pagination { position: absolute; - left: 16px; + left: 18px; + bottom: 16px; + width: 148px; + display: flex; justify-content: center; - width: 148px; - bottom: 16px; + gap: 4px; } + .swiper-pagination-bullet { position: relative; background-color: ${({ theme }) => theme.colors.inputSecondary}; @@ -37,6 +41,7 @@ export const StyledSwiper = styled(Swiper)` height: 4px; overflow: hidden; opacity: 1; + &.swiper-pagination-bullet-active { &::before { content: ''; @@ -44,8 +49,10 @@ export const StyledSwiper = styled(Swiper)` position: absolute; top: 0; left: 0; + width: 100%; height: 100%; + background-color: ${({ theme }) => theme.colors.secondary}; animation: ${progress} 5s linear forwards; transform-origin: left center; diff --git a/apps/web/src/components/AdPanel/Variations/ContentAd.tsx b/apps/web/src/components/AdPanel/Variations/ContentAd.tsx index 9d4f0080d377c..63cc5cff78843 100644 --- a/apps/web/src/components/AdPanel/Variations/ContentAd.tsx +++ b/apps/web/src/components/AdPanel/Variations/ContentAd.tsx @@ -1,11 +1,11 @@ +import { BodyText } from '../BodyText' import { AdButton } from '../Button' import { AdCard } from '../Card' -import { Content } from '../Content' export const ContentAd = () => { return ( - Web3 Notifications Now Live!! + Web3 Notifications Now Live!! Learn More diff --git a/apps/web/src/components/AdPanel/Variations/TitleContentAd.tsx b/apps/web/src/components/AdPanel/Variations/TitleContentAd.tsx index 64ef47752b105..652fee195964a 100644 --- a/apps/web/src/components/AdPanel/Variations/TitleContentAd.tsx +++ b/apps/web/src/components/AdPanel/Variations/TitleContentAd.tsx @@ -1,13 +1,13 @@ +import { BodyText } from '../BodyText' import { AdButton } from '../Button' import { AdCard } from '../Card' -import { Content } from '../Content' import { Title } from '../Title' export const TitleContentAd = () => { return ( Need Help? - Quick start now on How to Swap! + Quick start now on How to Swap! Quick start diff --git a/apps/web/src/components/AdPanel/config.tsx b/apps/web/src/components/AdPanel/config.tsx index f6d10844c7d0c..77fd1d87a1814 100644 --- a/apps/web/src/components/AdPanel/config.tsx +++ b/apps/web/src/components/AdPanel/config.tsx @@ -10,4 +10,20 @@ export const AdList = [ id: 'content-ad', component: , }, + { + id: 'title-content-ad', + component: , + }, + { + id: 'content-ad', + component: , + }, + { + id: 'title-content-ad', + component: , + }, + { + id: 'content-ad', + component: , + }, ] diff --git a/apps/web/src/components/AdPanel/index.ts b/apps/web/src/components/AdPanel/index.ts index 417ca34257283..140bb29dc4333 100644 --- a/apps/web/src/components/AdPanel/index.ts +++ b/apps/web/src/components/AdPanel/index.ts @@ -1,13 +1,13 @@ +import { BodyText } from './BodyText' import { AdButton as Button } from './Button' import { AdCard as Card } from './Card' import { DesktopCard, MobileCard } from './CardLayouts' -import { Content } from './Content' // TODO: Later move to widgets-internal with conventional exporting export const AdPanel = { DesktopCard, MobileCard, Card, - Content, + BodyText, Button, }