Skip to content

Commit

Permalink
Update Donate button state on campaign card (#1526)
Browse files Browse the repository at this point in the history
* Update Donate button state on campaign card

* Update disabled button text color and background color

---------

Co-authored-by: ani-kalpachka <[email protected]>
  • Loading branch information
ani-kalpachka and ani-kalpachka authored Jul 31, 2023
1 parent 5101fc6 commit 6fa85a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {
<StyledCardActions disableSpacing>
<DonateButton
href={routes.campaigns.oneTimeDonation(slug)}
disabled={
campaignState === CampaignState.complete &&
percentage >= 100 &&
!allowDonationOnComplete
}
disabled={campaignState === CampaignState.complete && !allowDonationOnComplete}
variant="contained"
color="secondary">
{t('cta.support')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ export const DonateButton = styled(LinkButton)(() => ({
'0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px rgba(0, 0, 0, 0.14), 0px 1px 5px rgba(0, 0, 0, 0.12)',
},

'&.Mui-disabled': {
backgroundColor: 'rgba(152, 152, 152, 0.8)',
color: 'rgba(0, 0, 0, 0.4)',
},

[theme.breakpoints.up(1111)]: {
display: 'inline-flex',
marginBottom: 0,
Expand Down

0 comments on commit 6fa85a4

Please sign in to comment.