Skip to content

Commit

Permalink
Update Completed campaigns carousel (#1424)
Browse files Browse the repository at this point in the history
* Update Completed campaigns carousel

* Align help button icon
  • Loading branch information
ani-kalpachka authored May 4, 2023
1 parent 1cf4594 commit c0a3401
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export const CarouselWrapper = styled(Slider)(() => ({
},
}))

export const CardWrapper = styled(Grid)(() => ({
[theme.breakpoints.up('sm')]: {
margin: theme.spacing(0, 1.25),
paddingRight: theme.spacing(2.5),
},
}))

export const CompletedCampaignLink = styled(Link)(() => ({
height: theme.spacing(37.5),
backgroundSize: 'cover',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
CampaignTitle,
CompletedCampaignLink,
MoneyWrapperFlex,
CardWrapper,
} from './CompletedCampaignsSection.styled'

export default function CompletedCampaignsSection() {
Expand All @@ -45,11 +46,7 @@ export default function CompletedCampaignsSection() {
</Heading>
<CarouselWrapper {...settings}>
{completedCampaigns?.map((campaign, index) => (
<Grid
key={index}
data-testid={`campaign-card-${index}`}
margin={theme.spacing(0, 2.25)}
paddingRight={theme.spacing(2.5)}>
<CardWrapper key={index} data-testid={`campaign-card-${index}`}>
<CompletedCampaignLink
onMouseDown={onLinkMouseDown}
href={routes.campaigns.viewCampaignBySlug(campaign.slug)}
Expand All @@ -75,7 +72,7 @@ export default function CompletedCampaignsSection() {
</MoneyWrapper>
<CampaignTitle>{campaign.title}</CampaignTitle>
</CompletedCampaignLink>
</Grid>
</CardWrapper>
))}
</CarouselWrapper>
</Root>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const settings: Settings = {
speed: 500,
slidesToShow: 4,
slidesToScroll: 1,
arrows: false,
dots: true,
lazyLoad: 'ondemand',
autoplay: true,
Expand All @@ -24,7 +25,7 @@ export const settings: Settings = {
},
},
{
breakpoint: 500,
breakpoint: 600,
settings: {
slidesToShow: 1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const HelpThoseInNeedButton = styled(LinkButton)(() => ({
minWidth: theme.spacing(50),

'& span': {
display: 'inline-block',
display: 'inline-flex',
},
},
}))

0 comments on commit c0a3401

Please sign in to comment.