From bc4af28fff019bdd3a1d64f9583eae4522151607 Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:41:25 +0530 Subject: [PATCH] fix: fixes visible currency selector for non tree donations while displaying gift form --- .../Micros/DonationTypes/BouquetDonations.tsx | 28 +++++++++---------- .../Micros/DonationTypes/FundingDonations.tsx | 14 +++++----- styles/donations.scss | 22 ++++++++++----- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/Donations/Micros/DonationTypes/BouquetDonations.tsx b/src/Donations/Micros/DonationTypes/BouquetDonations.tsx index 3893f92d..ed3ce57e 100644 --- a/src/Donations/Micros/DonationTypes/BouquetDonations.tsx +++ b/src/Donations/Micros/DonationTypes/BouquetDonations.tsx @@ -131,12 +131,12 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement { // return Math.trunc(Math.ceil(cost/5)*5); // } return ( - <> -
+
+
{paymentSetup && paymentSetup.frequencies && paymentSetup.frequencies[`${frequency}`].options.map( @@ -149,14 +149,14 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement { setisCustomDonation(false); setCustomInputValue(""); }} - className={`funding-selection-option ${ + className={`bouquet-selection-option ${ approximatelyEqual(option.quantity, quantity) && !isCustomDonation - ? "funding-selection-option-selected" + ? "bouquet-selection-option-selected" : "" }`} > -
+
{paymentSetup.purpose === "conservation" ? option.quantity @@ -175,8 +175,8 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement {
) : (
{ setisCustomDonation(true); @@ -197,7 +197,7 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement { : []}

) => { // replaces any character other than number to blank @@ -239,7 +239,7 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement {
) : (

@@ -299,7 +299,7 @@ function BouquetDonations({ setopenCurrencyModal }: Props): ReactElement {

)} - +
); } diff --git a/src/Donations/Micros/DonationTypes/FundingDonations.tsx b/src/Donations/Micros/DonationTypes/FundingDonations.tsx index f0b7eadd..062359da 100644 --- a/src/Donations/Micros/DonationTypes/FundingDonations.tsx +++ b/src/Donations/Micros/DonationTypes/FundingDonations.tsx @@ -103,12 +103,12 @@ function FundingDonations({ setopenCurrencyModal }: Props): ReactElement { const customInputRef = React.useRef(null); return ( - <> -
+
+
{paymentSetup && paymentSetup.frequencies && paymentSetup.frequencies[`${frequency}`] && @@ -280,7 +280,7 @@ function FundingDonations({ setopenCurrencyModal }: Props): ReactElement {
)} - +
); } function getPaymentOptionIcons(logoName: string) { diff --git a/styles/donations.scss b/styles/donations.scss index 3d98fc79..7002d1a5 100644 --- a/styles/donations.scss +++ b/styles/donations.scss @@ -296,13 +296,15 @@ width: 0px; } } -.funding-selection-options-container { +.funding-selection-options-container, +.bouquet-selection-options-container { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; margin-top: 10px; - .funding-selection-option { + .funding-selection-option, + .bouquet-selection-option { width: 130px; margin: 10px; // height: 80px; @@ -325,12 +327,14 @@ flex: calc(50% - 20px); } &.funding-selection-option-selected, + &.bouquet-selection-option-selected, &:hover, &:focus { cursor: pointer; background-color: $primaryColor; border: 1px solid $primaryColor; - .funding-selection-option-text { + .funding-selection-option-text, + .bouquet-selection-option-text { color: $primaryFontColor; p, span { @@ -349,7 +353,8 @@ &:active { transform: scale(0.98); } - .funding-selection-option-text { + .funding-selection-option-text, + .bouquet-selection-option-text { text-align: left; line-height: 1; // margin-left: 12px; @@ -479,7 +484,8 @@ outline: 0px; font-size: 16px; } -.funding-custom-tree-input { +.funding-custom-tree-input, +.bouquet-custom-tree-input { border: 0px; border-bottom: 2px solid $activeGreenBgTextColor; width: 100%; @@ -751,9 +757,11 @@ width: 100px; padding: 12px; } - .funding-selection-options-container { + .funding-selection-options-container, + .bouquet-selection-options-container { margin-top: 10px; - .funding-selection-option { + .funding-selection-option, + .bouquet-selection-option { width: 160px; &.monthly-option { width: 100px;